-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTextController.m
57 lines (40 loc) · 1.08 KB
/
TextController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// TextController.m
// Tumblor
//
// Created by orta on 20/07/2008.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "TextController.h"
#import "NSString_URLEncoding.h"
@implementation TextController
- (void) awakeFromNib{
_firstRun = true;
}
- (void) setBody:(NSString * ) body{
[bodyHTMLField setString:body];
}
- (void) setTitle:(NSString * ) title{
[titleTextField setStringValue:title];
}
- (void) hasBecomeKeyView{
if(_firstRun){
}
NSLog(@"%@", [mainWindow initialFirstResponder]);
[mainWindow setInitialFirstResponder:titleTextField];
//NSLog(@"%@", [[mainWindow initialFirstResponder] stringValue];);
NSLog(@"setInitialFirstResponder");
NSLog(@"%@", [mainWindow initialFirstResponder]);
}
- (void) resignedAsKeyView{
}
- (void) clear{
[self setBody:@""];
[self setTitle:@""];
}
- (NSDictionary *) values{
return [NSDictionary dictionaryWithObjectsAndKeys:
[[[bodyHTMLField textStorage] string] urlEncodeValue], @"body",
[titleTextField stringValue], @"title", nil];
}
@end