I have been able to work with delegates and notifications in the window doing the opening but so far that hasn't helped me to work inside the sheet window. I need to do some specific initialization inside the controller for the sheet every time it is shown. I should have made it load from its own Nib and will eventually but can't do it right at the moment. I suppose I could track the notification in the window that will open the sheet then create my own notification and subscribe to it from within the controller of the opened sheet but that type of workaround makes me think I am doing something fundamentally wrong. Any advice or thoughts from the more experienced?

On Dec 12, 2008, at 10:35 AM, Keary Suska wrote:


On Dec 12, 2008, at 11:26 AM, Robert Mullen wrote:

I have an NSWindow that unfortunately is in the Main nib of my project (to be changed later) and is being shown modally from the default NSWindow using beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo :. How can I trap when this modal sheet is displayed from within its controller? I could do awakeFromNib if it were loaded from its own NIB but that will not work for now. I have not been able to get an NSWiindow delegate or notification to fire when opening this way.


Are you able to observe NSWindowWillBeginSheetNotification on the NSWindow that will display the sheet?

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to