Re: accessing view in a nib
Re: accessing view in a nib
- Subject: Re: accessing view in a nib
- From: Amul Goswamy <email@hidden>
- Date: Thu, 24 Jul 2003 10:41:16 -0700
You can use the following method in NSBundle Additions to load the nib.
+ (BOOL)loadNibNamed:(NSString *)aNibName owner:(id)owner
Make an outlet on the file's owner in the nib and connect it to the
view to access the view. If you are using an NSTabView (tabless or
otherwise), you can implement the following delegate method and assign
the view to that particular NSTabViewItem (using the setView: method).
- (void)tabView:(NSTabView*)tabView
didSelectTabViewItem:(NSTabViewItem*)tabViewItem;
Amul Goswamy
Interface Builder QA
Apple
On Wednesday, July 23, 2003, at 11:05 PM, Francisco Tolmasky wrote:
Ok, so I'm trying to implement a more modularized preference system,
and I'd like to have each little preference pane in its own nib, so as
to not need to load them all at once or whatever. Anyways, how do I
make class that will load from a nib as NSWindowControllers do. I
just want the file's owner to be an instance of said class, and to
have a view along with it. I really don't want to have to make it a
subclass of nswindowcontroller. Also, how can I tell when the nib is
loaded and thus ready to be shown in the preferences thing. Just
awakeFromNibbing some flag or something?
Thank you,
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.