Re: runModalSession:relativeToWindow: alternative?
Re: runModalSession:relativeToWindow: alternative?
- Subject: Re: runModalSession:relativeToWindow: alternative?
- From: Matt Neuburg <email@hidden>
- Date: Tue, 29 Aug 2006 19:50:38 -0700
- Thread-topic: runModalSession:relativeToWindow: alternative?
On Tue, 29 Aug 2006 16:20:29 -0400, Michael Rondinelli <email@hidden> said:
>Hi There,
>
>So NSApp's runModalSession:relativeToWindow: method has been marked
>deprecated for some time, and the docs advise using beginModal:...
>instead. The problem is there is no way that I see to get a modal
>session back for a sheet otherwise. I need to do processing inside the
>modal run loop, for which the beginModal:... recommends using
>runModalSession!
>
>Is this a hole in the API, or is Apple implying that you shouldn't do
>work in a modal event loop?
I don't even have a runModalSession:relativeToWindow: in my copy of the
docs. So it's pretty hard to imagine what you might be asking.
To start a document-modal state (i.e. show a sheet), use
beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:. As the
docs on that method state, if you then need to go app-modal, you do it in
the usual way, namely, either with runModalForWindow: (which it sounds like
you don't want, since you want to do processing and not just get control
again in the next line) or with the usual beginModalSessionForWindow:
followed by repeated runModalSession: calls. None of the methods mentioned
in this paragraph are deprecated, AFAIK. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden