NSWindow delegate messages question
NSWindow delegate messages question
- Subject: NSWindow delegate messages question
- From: "Alexander Bokovikov" <email@hidden>
- Date: Fri, 18 Dec 2009 16:12:37 +0500
Hi, All,
I'm rather new in Cocoa development, so I have some misunderstanding after
API manuals reading. In particular I have a popup panel, opened by a button
click in the main window:
- (IBAction) btnClick:(id)sender {
[popupPanel showWindow];
}
I'd like to launch some process (no matter what exactly, it will work in
different thread) as soon this popup panel will appear on screen. Of
course, I could launch this process from within the same click handler
above, but I believe it will be better to do it all in the
WindowController's module, related to the popup panel. My question is: what
window delegate message should I use? Will it be OK to use
windowDidBecomeKey message or should I use windowDidExposed? Or whatever
else?
Another question is what notification could I use to display an alert box,
appearing _after_ this popup window will disappear from screen? For example,
I have a "Cancel" button on this popup panel, which should terminate the
launched process and (as a result of NSTask termination notification) panel
should be closed. For the sake of simplicity let's imagin, we're closing the
panel by button directly:
- (IBAction) btnCancelClick:(id)sender {
[[self window] close];
}
My question is: what window delegate message should I use to show an
NSAlert, in order my alert box would appear on screen already _after_ hiding
of the popup panel? As far as I can see, there is no windowDidClosed
message, but there is only windowWillClose. Is there any easy solution here?
Thanks in advance.
Best regards,
Alexander
_______________________________________________
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