Re: Tell Blocks Considered Harmful (was Re: open for access)
Re: Tell Blocks Considered Harmful (was Re: open for access)
- Subject: Re: Tell Blocks Considered Harmful (was Re: open for access)
- From: Philip Aker <email@hidden>
- Date: Sun, 14 Dec 2008 09:15:25 -0800
On 2008-12-14, at 05:44:48, Chris Page wrote:
What are implications for OSA components?
Sorry, the implications of what?
OSAExecuteEvent() and its immediate companions to be specific.
Leopard messed up the cursor handling for my OSA components which
give applets and droplets additional UI capabilities.
What do you mean by “cursor handling”?
I mean that in every applet and droplet in OS versions before Leopard,
I could run Carbon document windows invoked from custom events sent to
the component and the cursor handling would be as you would expect
with any Carbon app. In Leopard, the cursor gets stuck on the old-
style wait cursor -- but I can still click on buttons with it. The
cursor handling in Leopard only seems normal in modal dialogs.
I haven't been able to find a shred of documentation about changes
in applets at this level. In fact, every OS since 10.2 has involved
convoluted workarounds or loss of abilities for OSA components due
to changes.
Do you have any radar numbers for those? Or a quick summary of the
problems?
It's exactly as above. I believe I only wrote to the "other" Chris but
there was no reply for that specific item.
So I'm concerned about the implications of the sender vs target
topic you've brought up because components can delegate events to
the AppleScript component (or override them).
By “OSA components” do you mean scripting additions (OSAX) that
install event handlers in the Apple Event handler table, or do you
mean Component Manager scripting components, for which there is an
API for intercepting calls to other components?
OSAExecuteEvent() et. al. are in OSA.h
In any case, the issue is one of where we send scripting addition
command Apple Events. If a script has a scripting addition command
within an application tell block, that command goes to the target
application. What if we change it so that addition commands are
handled within the process running the script even when inside a
tell block? Does that affect your software?
Well, the way I understand it right now, I would actually need both
behaviors. For instance, if I implement a Mail rule, it's really weird
to call 'display dialog' (from the component in the rule handler)
because Mail is running its AppleEvents on a thread. But if 'display
dialog' is in a droplet, then I can use my override or not according
to the situation.
And BTW, I'm right with Hamish when he remarked in another thread:
"happily award a million internets to anyone that can create a modern,
flexible CFBundle-based replacement to the existing OSA architecture".
In fact we have been discussing OSA issues on and off since late 2002,
and really can't understand how the AppleScript team hasn't been
afforded the resources to upgrade the OSA interfacing. There's only
~40 APIs for a full implementation but they are an awesomely powerful
interface for the other built-in languages. A virtual gold mine Apple
hasn't been harvesting. On modern OS X (>= 10.5), I believe an
upgraded OSA wouldn't have to call much above CoreServices.
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden