Re: multiple NIB Question
Re: multiple NIB Question
- Subject: Re: multiple NIB Question
- From: Robert Cerny <email@hidden>
- Date: Fri, 24 Jan 2003 17:22:12 +0100
Hi,
do you really need to store and access NSUserDefaults pointer this way?
You can obtain a sharedInstance using standardUserDefaults...
[[NSUserDefaults standardUserDefaults] boolForKey:@"some key"]
Anyway, you can use a delegate for this purpose. Something like:
[[NSApp delegate] object_of_interest]
and of course, you need to implement the coresponding method in the
delegate
HTH
Robert
On Friday, Jan 24, 2003, at 12:58 Europe/Prague, Peter Fischer wrote:
Hello-
I'm somewhat of a Newbie, but am working on an application that is
to contain multiple NIBS. I'm having trouble figuring out how to get
data shared/visible between NIBS. For example:
Say I have MainMenu.nib in my project, and a "controller" class
called ApplicationController that is instantiated within this nib, so a
blue cube, for ApplicationController is visible, and both the .m & .h
files are created in my project.
I also have another NIB called Preferences, and Preferences
contains
its own "controller" class called PrefencesController.
PreferencesController is created by the ApplicationController code, so
the owner of PreferencesController points back to Application
controller.
My big question is, how can I see data declared in
ApplicationController, from inside of PreferencesController, or in
other words, I need to see parent data. If I have an NSUserDefaults
object declared within ApplicationController:
@interface ApplicationController : NSObject
{
NSUserDefaults preferencesData;
}
Is it possible for PreferencesController to get visibility to this
preferencesPane object, or am I declaring this in an incorrect spot?
Does this need to be declared in a more global namespace?
Thanks for any help you guys can give me.
--Pete
_______________________________________________
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.
_______________________________________________
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.