Re: POSIX and lists question
Re: POSIX and lists question
- Subject: Re: POSIX and lists question
- From: "Gary (Lists)" <email@hidden>
- Date: Fri, 12 Aug 2005 08:16:23 -0400
"has" wrote:
> AppleScript handlers look up lexically bound properties in their _current_
> context, not the context in which they were originally declared. Compile-time
> optimisations reduce name bindings to by-index lookups of the script object's
> slots, which explains the bizarre return values above.
>
Blah, blah, blah.
> Here's a clearer demonstration of what's going wrong:
>
> script a
> property x : 2
>
> on foo()
> return x
> end foo
> end script
>
> script b
> property z : 0
>
> property foo : a's foo
> end script
>
> b's foo() --> 0
I don't get why you are asking for b's handler foo().
Shouldn't that be
b's foo --> <<handler foo>>
Or are you making some other esoteric point?
It's clear that b has no such handler 'foo()' (even if one of its properties
might), but it does have a property named 'foo'.
If you are suggesting that AppleScript should return something useful from
b's foo(), then I'm glad that it doesn't.
That's just too many layers, isn't it?
And are these _real_ constructs in people's scripts? If so, I don't think I
am "scripting" the same way. Sure, a script object or two to speed up lists
and such, but are you all using things like this in daily script writing?
Or just for poking holes in things (which is fine, on its own merits, but
that goal should be highlighted when it rarely enters common practice)?
--
Gary
(Wondering a little just why 'has' keeps using AppleScript at all.)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden