Determining which sheet closed with panels in separate nibs
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