Re: AS Library Question
Re: AS Library Question
- Subject: Re: AS Library Question
- From: Shane Stanley <email@hidden>
- Date: Fri, 18 Dec 2015 10:10:22 +1100
On 18 Dec 2015, at 6:09 AM, has <email@hidden> wrote:
> But hey, as I say, there's nothing wrong with AppleScript that couldn't be fixed with a 100% total rethink, redesign, and rewrite.
I'm not sure what the point of repeating the bleeding obvious again and again is. I mean, we all know there are problems and limitations, and we all understand the probabilities. The choices are effectively to walk away, or try to make the best of what's there. That means knowing where the bodies are buried, sure -- but we don't really need to jump up and down on the graves every time.
> What happens when you use AS's loader to load two different libraries, one that uses `foo` and the other `Foo`? I'm guessing it's going to depend on which of those libraries gets imported first, but it sounds like they could end up fighting with each other too?
Yes, it's nothing new: purely a matter of order. The most deeply nested lib used by the first lib will be the ultimate winner. If the first lib uses Foo and the script itself uses Foo, you won't see a problem with a -foo method in the second lib until you run it (at which time the unrecognized selector error will tell all, but may not be obvious to AS users). Exactly the same thing will happen with "load script" and multiple scripts, except the loading order is obviously different.
That's why I said using a use statement makes it a *little* easier trouble-shooting wise.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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