• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Modal dialog preventing NSNotification delivery?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Modal dialog preventing NSNotification delivery? (From: Glen Simmons <email@hidden>)
 >Re: Modal dialog preventing NSNotification delivery? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: newbie question re. cocoa front-end to sql db
  • Next by Date: Re: newbie question re. cocoa front-end to sql db
  • Previous by thread: Re: Modal dialog preventing NSNotification delivery?
  • Next by thread: Any limitations on keychain password?
  • Index(es):
    • Date
    • Thread