The R Project SVN R-packages

Rev

Rev 648 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 648 Rev 1253
Line 11... Line 11...
11
 
11
 
12
@interface AMPreferencePane (Private)
12
@interface AMPreferencePane (Private)
13
- (NSView *)loadMainView;
13
- (NSView *)loadMainView;
14
- (NSBundle *)pluginBundle;
14
- (NSBundle *)pluginBundle;
15
- (void)setPluginBundle:(NSBundle *)newPluginBundle;
15
- (void)setPluginBundle:(NSBundle *)newPluginBundle;
16
- (NSObject <AMPrefPaneProtocol> *)prefPane;
16
- (NSObject <AMPrefPaneProtocol>*)prefPane;
17
- (void)setIdentifier:(NSString *)newIdentifier;
17
- (void)setIdentifier:(NSString *)newIdentifier;
18
- (void)setPrefPane:(id <AMPrefPaneProtocol>)newPrefPane;
18
- (void)setPrefPane:(NSObject <AMPrefPaneProtocol>*)newPrefPane;
19
- (void)setLabel:(NSString *)newLabel;
19
- (void)setLabel:(NSString *)newLabel;
20
- (void)setMainView:(NSView *)newMainView;
20
- (void)setMainView:(NSView *)newMainView;
21
- (void)setIcon:(NSImage *)newIcon;
21
- (void)setIcon:(NSImage *)newIcon;
22
- (void)setCategory:(NSString *)newCategory;
22
- (void)setCategory:(NSString *)newCategory;
23
- (void)setVersion:(NSString *)newLabel;
23
- (void)setVersion:(NSString *)newLabel;
Line 210... Line 210...
210
		[old release];
210
		[old release];
211
	}
211
	}
212
}
212
}
213
 
213
 
214
 
214
 
215
- (id <AMPrefPaneProtocol>)prefPane
215
- (NSObject <AMPrefPaneProtocol>*)prefPane
216
{
216
{
217
	if (!prefPane && pluginBundle) {
217
	if (!prefPane && pluginBundle) {
218
		// load bundle nib file
218
		// load bundle nib file
219
		NSString* pluginPrincipalClass = [pluginBundle objectForInfoDictionaryKey:NSPrincipalClassKey];
219
		NSString* pluginPrincipalClass = [pluginBundle objectForInfoDictionaryKey:NSPrincipalClassKey];
220
		Class pluginClass = [pluginBundle classNamed:pluginPrincipalClass];
220
		Class pluginClass = [pluginBundle classNamed:pluginPrincipalClass];
221
		id <AMPrefPaneProtocol> newPrefPane = nil;
221
		NSObject <AMPrefPaneProtocol>* newPrefPane = nil;
222
		if (newPrefPane = [[[pluginClass alloc] initWithBundle:pluginBundle] autorelease]) {
222
		if (newPrefPane = [[[pluginClass alloc] initWithBundle:pluginBundle] autorelease]) {
223
			[self setPrefPane:newPrefPane];
223
			[self setPrefPane:newPrefPane];
224
			if ([prefPane respondsToSelector:@selector(loadMainView)])
224
			if ([prefPane respondsToSelector:@selector(loadMainView)])
225
				[prefPane loadMainView];
225
				[prefPane loadMainView];
226
		}
226
		}
227
	}
227
	}
228
	return (id <AMPrefPaneProtocol>)prefPane;
228
	return prefPane;
229
}
229
}
230
 
230
 
231
- (void)setPrefPane:(NSObject <AMPrefPaneProtocol>*)newPrefPane
231
- (void)setPrefPane:(NSObject <AMPrefPaneProtocol>*)newPrefPane
232
{
232
{
233
	id old = nil;
233
	id old = nil;