The R Project SVN R-packages

Rev

Rev 4826 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4826 Rev 4919
Line 5... Line 5...
5
//  Created by Simon Urbanek on 10/13/07.
5
//  Created by Simon Urbanek on 10/13/07.
6
//  Copyright 2007 __MyCompanyName__. All rights reserved.
6
//  Copyright 2007 __MyCompanyName__. All rights reserved.
7
//
7
//
8
 
8
 
9
#import "RDocumentWinCtrl.h"
9
#import "RDocumentWinCtrl.h"
10
 
-
 
-
 
10
#import "RDocument.h"
11
 
11
 
12
@implementation RDocumentWinCtrl
12
@implementation RDocumentWinCtrl
13
 
13
 
-
 
14
- (void)windowDidLoad
-
 
15
{
-
 
16
	RDocument *doc = [self document];
-
 
17
	NSString *str = [doc string];
-
 
18
	if (str)
-
 
19
		[self replaceContentsWithString:str];
-
 
20
}
-
 
21
 
-
 
22
- (IBAction) executeSelection: (id) sender
-
 
23
{
-
 
24
	
-
 
25
}
-
 
26
 
-
 
27
- (NSString*) string
-
 
28
{
-
 
29
	return [textView string];
-
 
30
}
-
 
31
 
-
 
32
- (BOOL) isEdited
-
 
33
{
-
 
34
	return edited;
-
 
35
}
-
 
36
 
-
 
37
- (void) replaceContentsWithString: (NSString*) aString
-
 
38
{
-
 
39
	NSLog(@"RDocumentWinCtrl.replaceContentsWithString: (tv=%@)", textView);
-
 
40
	if (textView)
-
 
41
		[textView setString:aString];
-
 
42
	edited = NO;
-
 
43
}
-
 
44
 
-
 
45
- (void)textDidChange:(NSNotification *)aNotification
-
 
46
{
-
 
47
	edited = YES;
-
 
48
}
-
 
49
 
14
@end
50
@end