• 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
Determining which sheet closed with panels in separate nibs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Determining which sheet closed with panels in separate nibs


  • Subject: Determining which sheet closed with panels in separate nibs
  • From: Michael Watson <email@hidden>
  • Date: Thu, 17 Apr 2008 15:49:13 -0400

Inside of MainMenu.nib, I have my application's main window. Also in MainMenu.nib is an NSObject subclass instance that is the main window's delegate.

In another nib, I have a panel and an NSObject subclass instance that is the panel's delegate. The panel is opened attached as a sheet to the main window.

When the sheet is closed on the main window, I need to do some things, so I implement -[NSWindow windowDidEndSheet:] in the main window's delegate. The problem is that I have other panels I attach as sheets to this window in different situations, and I need to distinguish between them so I take the correct action for the specific sheet that has closed.

Normally, I'd just compare one outlet to another, but the panel itself is in another nib, and as such I can't hook it up to an outlet in the main window delegate.

What's a reasonable procedure here to determine which sheet closed when dealing with panels in separate nibs?


-- m-s

_______________________________________________

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: Determining which sheet closed with panels in separate nibs
      • From: "Sherm Pendley" <email@hidden>
  • Prev by Date: Re: Vended Object Setters
  • Next by Date: Re: -charactersIgnoringModifiers and the shift key
  • Previous by thread: Re: OpenGL in a Visual iTunes Plugin
  • Next by thread: Re: Determining which sheet closed with panels in separate nibs
  • Index(es):
    • Date
    • Thread