• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
identification of preference modules and making them visible.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

identification of preference modules and making them visible.


  • Subject: identification of preference modules and making them visible.
  • From: email@hidden
  • Date: Mon, 9 Feb 2004 01:57:12 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, this is what I have
been able to make work.
_______________________________________________

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 module
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.

_______________________________________________

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.

  • Prev by Date: Re: Entering UniCode
  • Next by Date: Optimizing Drawing (was Re: Drawing onto NSImageView subclass (Newbie))
  • Previous by thread: Re: How do I soft-wrap text at a specific line length?
  • Next by thread: NSButtonCell textattachment
  • Index(es):
    • Date
    • Thread