Re: NSPanel and runModalForWindow: problems
Re: NSPanel and runModalForWindow: problems
- Subject: Re: NSPanel and runModalForWindow: problems
- From: Daniel Káčer <email@hidden>
- Date: Mon, 15 Feb 2010 19:28:08 +0100
Thank you, but maybe i have not describe it quite right, but my issue
is, that in first calling of showModal function is my NSPanel
displayed top of all windows on my desktop and clicking on any window
will this window not overlap my NSPanel and will remain this my panel
still on top. This is correct functionality ! :) But .. this function
showModal is called multiple times during runnig my application, and
this NSPanel is multiple showed and closed. But only first calling of
showModal function will showing my panel still on top of all windows
on desktop, all other calls this function, during running my
application, show my panel so, that is no problem overlap him with
clicking to another window and panel will not remain on top. :(
thnx
Daniel
On Feb 15, 2010, at 17:19 , Keary Suska wrote:
On Feb 13, 2010, at 7:53 AM, Daniel Káčer wrote:
I have a NSPanel that is opened like Modal panel:
-(void) showModal {
[NSApp runModalForWindow: myWindow];
}
and is closed with event click on button that is allocated on this
NSPanel:
-(IBAction)delayWindow:(id)sender {
[NSApp abortModal];
//[myWindow orderOut: self];
[myWindow close];
}
First calling of runModalForWindow: works fine and NSPanel is in
modal status but after calling delayWindow and after then second
calling of showModal is NSPanel correctly showed but is not in
Modal status :(
What i do wrongly and why is not my NSPanel in Modal status after
second, third etc. calling of showModal ?
The proper way to end a modal session within the modal event loop is
to use -stopModal or -stopModalWithCode: . Try that and keep the -
orderOut call (not because it is necessary, just that it is a good
practice for windows you know you will re-use without re-loading).
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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