• 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: Using NSApplescript while keeping UI responsive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSApplescript while keeping UI responsive


  • Subject: Re: Using NSApplescript while keeping UI responsive
  • From: Andrew Thompson <email@hidden>
  • Date: Wed, 28 Jul 2004 00:04:31 -0400

On Jul 27, 2004, at 10:07 PM, email@hidden wrote:

You are absolutely right Nick.... my bad!

Thomaz

On Jul 27, 2004, at 12:10 PM, Nick Zitzmann wrote:


On Jul 27, 2004, at 12:44 PM, Edison Thomaz wrote:

The obvious answer to that would be to do
all the NSApplescript work on another thread, but NSApplescript is not
thread-safe (part of AppKit).

NSAppleScript is part of Foundation, not AppKit.

Regardless of which framework NSAppleScript belongs to, it is most definitely
*not* thread-safe. I wasted a lot of time trying to get it to work a while
back, and it resulted in a lot of crashes...

This sort of comment is always a bit curious to me.
In most environments the phrase "not thread safe" indicates a component must not be called from multiple threads concurrently.

The requirement here is a bit stronger isn't it?
Its not that its not thread safe, its that it has an absolute requirement that it only ever be called from the application's main thread. Clearly this isn't "thread safe" but it is also rather worse than that.

Still, no different to Swing & AWT in Java, where most operations that effect GUI widgets must be called on the AWT/Swing event dispatch thread.

AndyT (lordpixel - the cat who walks through walls)
A little bigger on the inside

(see you later space cowboy ...)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Using NSApplescript while keeping UI responsive
      • From: Andreas Mayer <email@hidden>
References: 
 >Using NSApplescript while keeping UI responsive (From: Edison Thomaz <email@hidden>)
 >Re: Using NSApplescript while keeping UI responsive (From: Nick Zitzmann <email@hidden>)
 >Re: Using NSApplescript while keeping UI responsive (From: Edison Thomaz <email@hidden>)
 >Re: Using NSApplescript while keeping UI responsive (From: email@hidden)

  • Prev by Date: Re: Who should release whom in a document-based app?
  • Next by Date: Custom Widget
  • Previous by thread: Re: Using NSApplescript while keeping UI responsive
  • Next by thread: Re: Using NSApplescript while keeping UI responsive
  • Index(es):
    • Date
    • Thread