Sorry for the noise...a clear indication has been given that I need to
stop coding for today:
orderOut: is required to actually close the frickin' window...
Stick a fork in me...
On Jul 30, 2008, at 7:00 PM, Randall Meadows wrote:
OK, here's an interesting one...
I invoke [NSApp runModalForWindow:confirmDeletionWdw] from an
IBAction (call it MethodA) of a popup menu item displayed in a sheet.
That modal window has a button, in whose IBAction (call it MethodB)
I call [NSApp stopModalWithCode:[sender tag]].
The modal loop ends, control returns to my MethodA (with the
appropriate return code), and my app continues on. However, the
modal window is *still* displayed on screen. It's no longer modal;
I can click back in my original sheet, and interact with it, etc. I
can also still interact with the no-longer-modal modal window, and
the buttons' actions are triggered.
I was under the impression that, having displayed and started a
modal window loop with runModalForWindow:, that stopModalWithCode:
would stop the modal loop and close (or at least hide) the window.
The docs say that "This method stops the loop only if it’s executed
by code responding to an event", which I'm doing as part of the
IBAction assigned to the button, no?
Any ideas on what I'm supposed to do to get this modal window to
disappear when the modal loop is over?
Tank ewe!
randy
PS - In case anyone's wondering, I'm using the modal window because
the action the user is about to do is being confirmed, in a very
noticeable way, since the action is about to delete files. I'm NOT
using a sheet for this, since the action is already being requested
*from* a sheet, and said sheet is *already* part of a *series* of
sheets. The modal window simply seemed the best route to go.
_______________________________________________
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 [EMAIL PROTECTED]