• 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
sheet, modal run loop, main run loop and equeueing of notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sheet, modal run loop, main run loop and equeueing of notifications


  • Subject: sheet, modal run loop, main run loop and equeueing of notifications
  • From: Ruotger Skupin <email@hidden>
  • Date: Fri, 24 Feb 2006 10:54:37 +0100

Hi,

maybe I got it all wrong but that's how I understand it:

If I want a custom sheet I design a panel and call [NSApp beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:]. NSApp shows the sheet, starts a new run loop and handles all selectors and notifications in that modal run loop. But notifications that I have enqueued in the main run loop with [[NSNotificationQueue defaultQueue] enqueueNotification:notification postingStyle:NSPostWhenIdle] are stuck in the main run loops queue and will not posted before stopMode.

Ok, now,

I wrote code that relies heavily on posting Notifications with NSPostWhenIdle and it immediately stops working when the sheet comes up. I guess I could just run the whole thing from the modal run loop but unfortunately the sheet's windowDidBecomeKey: delegate method is still fired from the main run loop. aargh!

So, how can I get a delegate callback or notification from the modal run loop when it is started?

regards
	Ruotger


--- Ruotger Skupin, Mac OS X Software Engineering

ilink Kommunikationssysteme GmbH
Münzstr. 13; 10178 Berlin - Germany



_______________________________________________
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


  • Prev by Date: Re: How to hide system menu bar and the dock bar in cocoa?
  • Next by Date: Re: Growl Support?
  • Previous by thread: Re: How to hide system menu bar and the dock bar in cocoa?
  • Next by thread: programmatically enable script menu
  • Index(es):
    • Date
    • Thread