Accessing window in NSAlert didEndSelector:
Accessing window in NSAlert didEndSelector:
- Subject: Accessing window in NSAlert didEndSelector:
- From: Alain Schartz <email@hidden>
- Date: Thu, 09 Aug 2007 05:44:24 -0700
Hello list,
I have an alert sheet which is displayed if a text field on a window is empty. The alert is displayed using beginSheetModalForWindow: and calls a didEndSelector: method. But after dismissing the alert, the focus seems to return to the main DOCUMENT window and not to the TRIGGERING window of the alert (i.e. the window onto which the alert was attached).
So in my didEndSelector: method I want to call makeWindowKey: to return focus to my triggering window. Can anyone give me a hint how this can be done? I suppose I should use contextInfo: to pass a pointer to my window to the didEndSelector, but I can't seem to find any valuable example in the documentation.
Thanks,
Alain
_______________________________________________
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