Re: Don't understand delay action
Re: Don't understand delay action
- Subject: Re: Don't understand delay action
- From: Alex Zavatone <email@hidden>
- Date: Tue, 10 Mar 2015 19:46:20 -0400
AHA!
on delay x
log (x)
end delay
This code above compiles.
This doesn't…
on doDelay x
log (x)
end doDelay
I'm assuming here that since delay is already a reserved word, that things are different.
On Mar 10, 2015, at 5:08 PM, Stockly, Ed wrote:
> On 3/10/15, 9:12 AM, "Alex Zavatone" <email@hidden> wrote:
>
>
>> In the past, when I wrote something like this, I would call it something
>> like "doDelay" or "doSleep", just to make sure there was no method name
>> collision.
>>
>> AppleScript seems weird sometimes just how it will not require parent on
>> functions. The closest I can recall is from Director's Lingo where
>> parens were only required if the function/method was to return a value
>> and they were optional if you were just passing a value to it.
>
> I think this is based on the way it worked in hyperCard (appleScript's
> mama), where scripts could be attached to a button/field; to the card
> those are on; to the background the card is in; to the stack with the
> background and, in some cases to the HyperCard application.
>
> Handler calls could be sent to the scripts of any of those objects.
>
> If a handler call wasn't handled in a script at the bottom or anywhere
> else in the hierarchy, it would be passed up to next level, and if not
> handled there passed up to the next.
>
> In appleScript, if your script doesn't have a delay handler, it's passed
> up to appleScript. I think it ends there and I'm not sure how script
> objects figure into that hierarchy.
>
> I believe that specific handlers that are defined by appleScript can have
> a single param: idle; delay; open; quit; run.
>
> With these commands, if they're handled in the script they're not passed
> up the hierarchy, unless you specify ("continue quit" for example).
>
> So, presumably, if they ever get progress and delay working, you could do
> something like:
>
> On Delay x
> My ProgressHandler(x)
> Continue delay
> End
>
> I have no idea if it will actually work that way.
>>
>
_______________________________________________
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