The R Project SVN R-packages

Rev

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

Rev 5724 Rev 5737
Line 1... Line 1...
1
#import "VignettesController.h"
1
#import "VignettesController.h"
2
 
2
 
3
#import "REngine/REngine.h"
3
#import "REngine/REngine.h"
4
#import "REngine/RSEXP.h"
4
#import "REngine/RSEXP.h"
-
 
5
#import "RController.h"
5
 
6
 
6
@implementation VignettesController
7
@implementation VignettesController
7
 
8
 
8
static VignettesController *vignettesSharedController = nil;
9
static VignettesController *vignettesSharedController = nil;
9
 
10
 
Line 200... Line 201...
200
	[openButton setEnabled: ([tableView selectedRow]!=-1)];
201
	[openButton setEnabled: ([tableView selectedRow]!=-1)];
201
	[openSourceButton setEnabled: ([tableView selectedRow]!=-1)];
202
	[openSourceButton setEnabled: ([tableView selectedRow]!=-1)];
202
	vignettesSharedController = self;
203
	vignettesSharedController = self;
203
}
204
}
204
 
205
 
-
 
206
- (IBAction)executeSelection:(id)sender
-
 
207
{
-
 
208
	PDFSelection *dr = [thePDFView currentSelection];
-
 
209
	if (dr) { /* we don't do line-exec since we don't get the text outside the selection */
-
 
210
		NSString *stx = [dr string];
-
 
211
		[[RController sharedController] sendInput:stx];
-
 
212
	}
-
 
213
}
-
 
214
 
-
 
215
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
-
 
216
{
-
 
217
	if ([menuItem action] == @selector(executeSelection:)) {
-
 
218
		return ([thePDFView currentSelection] == nil) ? NO : YES;
-
 
219
	}
-
 
220
 
-
 
221
	return YES;
-
 
222
}
-
 
223
 
205
@end
224
@end