• 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: How to load a sheet in a separate Nib file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load a sheet in a separate Nib file


  • Subject: Re: How to load a sheet in a separate Nib file
  • From: Fei Li <email@hidden>
  • Date: Wed, 27 Aug 2003 17:12:59 -0600

Thanks for responding. I've already do what you mentioned here but
still have some questions.

The sheetController is derived from NSWindowController. I wonder if the
sheetController must be derived from NSWidnowController or can just
from NSObject.

How can I get sheet and sheetController from my main controller?
Because in [NSApp beginSheet: sheet modalForWindow: [self window]
modalDelegate: sheetController didEndSelector: nil contextInfo: nil]; I
must have an sheet object already, how can I get this? Use [NSBundle
loadNibNamed: @"SheetDialog" owner:sheetController ]; I need
sheetController object which I also don' t have. I get these two object
by connect sheetController and sheet to my main controller, but I don't
think it's the correct way?

Thanks for any information!
Fei


On Wednesday, August 27, 2003, at 04:45 PM, Scott Anguish wrote:

>
> On Aug 27, 2003, at 5:41 PM, Fei Li wrote:
>
>> If anybody have idea about this? I read some articles and document for
>> using sheet in cocoa, but they all put the sheet in the same nib file
>> of the main window and use main controller or the controller in the
>> main nib file to control the element on the sheet.
>>
>
> This isn't sheet specific, just the usual dance for dealing with
> multiple nibs.
>
> From your code, you'd already have an object called sheetController
> that has been created. In the sheet nib, set the File's Owner to be
> the class that sheetController is. Then add an outlet for the sheet
> to the SheetController class and connect the sheet to the File's Owner
> in IB, and do that outlet. Make sure that you're target actions for
> buttons and such also connect to File's Owner and then the target
> action.
_______________________________________________
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.

  • Follow-Ups:
    • Re: How to load a sheet in a separate Nib file
      • From: Scott Anguish <email@hidden>
References: 
 >Re: How to load a sheet in a separate Nib file (From: Scott Anguish <email@hidden>)

  • Prev by Date: Limiting a float
  • Next by Date: Re: Limiting a float
  • Previous by thread: Re: How to load a sheet in a separate Nib file
  • Next by thread: Re: How to load a sheet in a separate Nib file
  • Index(es):
    • Date
    • Thread