Re: on blocking target applications' GUIs (was Re: Tell Blocks Considered Harmful)
Re: on blocking target applications' GUIs (was Re: Tell Blocks Considered Harmful)
- Subject: Re: on blocking target applications' GUIs (was Re: Tell Blocks Considered Harmful)
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 17 Dec 2008 13:27:12 -0800
- Thread-topic: on blocking target applications' GUIs (was Re: Tell Blocks Considered Harmful)
On 12/17/08 12:17 PM, "has" <email@hidden> wrote:
>
> The problem here is that the Apple Event Object Model (which
> determines the way that scriptable applications work) has absolutely
> no concept of object ownership or session management [2]. i.e. Anyone
> can create an object in a scriptable application, and anyone can
> manipulate that object thereafter - regardless of whether or not they
> have any business doing so.
>
> The correct approach would be to allow each script to reserve
> exclusive access to any application objects it needs to use for as
> long as it needs to use them. For example, if script A opens document
> B in TextEdit, *nobody else* - not the human user, not other scripts -
> should be allowed to manipulate document B (or quit TextEdit from
> under it) while script A is working on it. Once script A has finished
> with these objects it can close or unlock them again, at which point
> other clients are free to take their turn.
This is correct. I agree. Confining worries to just when display dialogs are
up is rather feeble and beside the point. What about all the rest of the
time a script is running?
Actually there are some apps with their own script menus that work this way
when a script is being run by the application - i.e. from its script menu.
For example, Entourage. It's very useful for preventing users messing with
the data the script is working on. On the very, very few occasions when I
don't need to worry about this (I've assembled all the data at the beginning
of the script and want to let the user do whatever he wants as it runs) I
package the script as an applet instead.
--
Paul Berkowitz
_______________________________________________
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