• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom sheet question - which variable?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Custom sheet question - which variable?
      • From: Roland King <email@hidden>
References: 
 >Re: Custom sheet question - which variable? (From: Jenny M <email@hidden>)
 >Re: Custom sheet question - which variable? (From: Roland King <email@hidden>)

  • Prev by Date: Re: How to know whether property in Cocoa class is KVO-compliant?
  • Next by Date: Re: Differentiate FAT16 and FAT32
  • Previous by thread: Re: Custom sheet question - which variable?
  • Next by thread: Re: Custom sheet question - which variable?
  • Index(es):
    • Date
    • Thread