Bundle question correction
Bundle question correction
- Subject: Bundle question correction
- From: Rob Rix <email@hidden>
- Date: Wed, 1 Aug 2001 07:07:01 -0400
Okay, well, I finally figured out how to load bundles properly. Now I'm
trying to test it with a sample bundle.
So, the new conundrum:
My application makes a global menu and loads bundles which add items to
that menu. My main controller (FDMenuController) has a -(NSMenu *)menu
method so that bundles can find the menu and add what they want to it.
The difficulty comes with bundles that it will load: how do I tell them
where to get the menu? The compiler will choke if I try to use the shared
controller with [FDMenuController sharedController] because that class
doesn't exist in the bundle, and my application's principal class is, of
course, NSApplication.
Should I make my FDMenuController instance the NSApplication's delegate
and use [[[NSBundle mainBundle] principalClass] delegate] to get at the
instance?
Thanks for any guidance,
-- Rob
"I think therefore I am" - Descartes
"I am, I think" - Me