Re: Passing References During Initialization / Nib Loading
Re: Passing References During Initialization / Nib Loading
- Subject: Re: Passing References During Initialization / Nib Loading
- From: Brad Gibbs <email@hidden>
- Date: Thu, 11 Jun 2009 12:51:01 -0700
Also, if I drop an object into the MainWindowController's nib file and
that object is also the File's Owner for another nib file, won't the
awakeFromNib method for that object be called twice? I'm doing some
fetching in awakeFromNib methods to fetch information that needs to
load as the view is loading, so, I'd effectively be performing each
fetch twice, wouldn't I?
Thanks.
On Jun 11, 2009, at 12:45 PM, Brad Gibbs wrote:
Well, I've got about 20+ different view controllers.... I was
trying to avoid dropping all of those into the main window
controller's nib file. Maybe that's what I need to do, though.
I was taking self.view.window.windowController, which was working
fine, as long as it was being called after awakeFromNib.
On Jun 11, 2009, at 11:58 AM, Kyle Sluder wrote:
On Thu, Jun 11, 2009 at 11:52 AM, Brad Gibbs<email@hidden>
wrote:
Is there something I'm missing?
It sounds like you're going about it wrong. Create outlets on your
objects and wire them up to your window controller, which should be
the File's Owner of the nib. No "passing references" required.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden