Re: Modal dialog preventing NSNotification delivery?
Re: Modal dialog preventing NSNotification delivery?
- Subject: Re: Modal dialog preventing NSNotification delivery?
- From: Glen Simmons <email@hidden>
- Date: Wed, 22 Mar 2006 13:51:25 -0600
On Mar 22, 2006, at 10:23 AM, Ondra Cada wrote:
Glen,
On 22.3.2006, at 16:30, Glen Simmons wrote:
I need to know when a couple of NSTasks are completed, which the
docs tell me I should do by registering for
NSTaskDidTerminateNotification. This is fine, unless my app needs
to show a modal dialog at startup, which apparently prevents
NSNotifications from being delivered. How do I get notifications
when running modal? Or, how do I find out the NSTasks are done
without the notifications? I know I could poll them, but that's
not ideal. Ideas?
Check NSNotificationQueue methods
enqueueNotification:postingStyle:coalesceMask:forModes: -- those
modes are what you need.
I dunno how to make NSTask though to post in
NSModalPanelRunLoopMode though -- that part of the answer remains,
alas, open.
I couldn't figure out how to get NSTask to do that either. So, I
ditched the notifications and am now spinning off a thread that runs
the task and calls waitUntilExit. Kind of silly to spin a thread to
run an NSTask, but …
Thanks,
Glen _______________________________________________
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