Re: Custom sheet question - which variable?
Re: Custom sheet question - which variable?
- Subject: Re: Custom sheet question - which variable?
- From: Jenny M <email@hidden>
- Date: Mon, 11 Jan 2010 00:53:18 -0800
Oooh... okay, that helps... I haven't loaded yet, so I'm not sure what to
put in it. In the MyObject XIB file, I manually set File's Owner to be the
custom NSWindowController subclass, not AppDelegate. But, I'm trying to open
the sheet from the AppDelegate class. Is that possible?
It's possible I shouldn't separate this, at least to do what I want to be
able to do with sheet.s In the books I've read, that's the way they've set
up objects and controllers for MVC... I'm still learning, I'm in the middle
(somewhere, on and off) of Hillegass and Anderson's books, but they don't
answer everything. :) Thanks for the help here, guys, much appreciated.
On Mon, Jan 11, 2010 at 12:37 AM, Roland King <email@hidden> wrote:
>
>
> In your [ NSBundle loadNibNamed .. ] what's 'self' the owner you've given
> it, is that your AppDelegate subclass? That's how you hook this up.
>
> In IB you have 'Files Owner' which is going to be whatever object you pass
> into the loadNibNamed call. So add an outlet to that (IBOutlet property of
> type NSWindow* or similar called whatever makes sense to you), then hook up
> the window in your XIB to that property of File's Owner.
>
> Now the window is in [ self whateverPropertyYouCalledIt ] after the NIB has
> loaded.
>
_______________________________________________
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