Re: Using NSApplescript while keeping UI responsive
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.