• 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: Problem with stopModalWithCode on a different thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with stopModalWithCode on a different thread


  • Subject: Re: Problem with stopModalWithCode on a different thread
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 21 Jun 2010 17:33:35 -0700

On Jun 21, 2010, at 11:09 AM, Bill Appleton wrote:

> In 64 bit Safari our NPAPI plugin needs to use a few system dialogs for
> opening files, printing, etc.
>
> These system dialogs call stopModalWithCode to deliver the result of the
> dialog interaction back to the runModalForWindow function
>
> But the stopModalWithCode function does not work on another thread

Wait, why is stopModalWithCode being called from a background thread? If the system dialogs are calling it, they would only call it on the main (UI) thread.

In general, if you have some kind of background activity that needs to call some AppKit method like this, use -performSelectorOnMainThread:.

—Jens_______________________________________________

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

  • Follow-Ups:
    • Re: Problem with stopModalWithCode on a different thread
      • From: Charles Srstka <email@hidden>
References: 
 >Problem with stopModalWithCode on a different thread (From: Bill Appleton <email@hidden>)

  • Prev by Date: Re: docs, KVO and NSUserDefaults etc.
  • Next by Date: NSView Docs. Was: Binding -- or not -- a button created in code
  • Previous by thread: Problem with stopModalWithCode on a different thread
  • Next by thread: Re: Problem with stopModalWithCode on a different thread
  • Index(es):
    • Date
    • Thread