Identifying preferencePanes
Identifying preferencePanes
- Subject: Identifying preferencePanes
- From: email@hidden
- Date: Mon, 9 Feb 2004 17:49:11 EST
I have been trying to generate preference options but have been experiencing
problems so I have resorted back to the minimal code and am seeking assistance.
The code that I have been working with is partially static because I have had
problems getting it to automatically add the modules.
Here is what works provided I list the modules I want to include.
_______________________________________________
if (!prefs) // this is first pass, nothing has been assigned yet.
{
// Determine path to the preference panes
NSString *pathToPanes = [[NSString
stringWithFormat:@"~/Library/PreferencePanes/", [[NSBundle mainBundle] bundlePath]] stringByStandardizingPath];
prefs = [[PrefsController alloc] initWithPanesSearchPath:pathToPanes];
// example from a module
//
// + (NSArray *)preferencePanes
// {
// return [NSArray arrayWithObjects:[[[EmulatePrefController
alloc] init] autorelease], nil];
// }
//
// - (NSString *)paneOwner
// {
// return @"XSKeyEMU"; // we only want modules that belong to us
// }
//
// - (NSString *)paneName
// {
// return @"Emulate"; // name of this specific module
// }
//
// Set which panes are included (done manually cause I had
identification problems).
[prefs setPanesOrder:[NSArray arrayWithObjects:@"General",
@"Emulate", @"Update", @"Another Preference Pane", nil]];
}
// Show the preferences window with the available options.
[prefs showPreferencesWindow];
Anyone have an idea how I can get it to recognize and add the modules, the
problem I'm having is I either can't recognize any modules or I recognize all
modules including those that don't belong.
I can make the source available to you if you require more information that
posted here.
_______________________________________________
Dale
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.