On 17 Jun 2014, at 8:22 pm, Nigel Garvey <email@hidden> wrote:
The new system, despite the hype in the videos to which James linked, only adds [...] and the ability to use non-vanilla terminology out of context in scripts, if you think that's a clever idea.
I think your last point relates to the use command, but that really has nothing to do with libraries; you can address libraries with or without it, just as you can write any script with or without it. The command is *required* only within a library script itself, and then only for loading frameworks if it's ASObjC-based.
There's a fair bit of confusion on this point, partly because the two features were introduced at the same time, and partly, I suspect, because many of the examples (especially from me) have used the use command rather than addressing libraries in a tell block.
All of these forms are valid for a script library:
tell script "Check modifier with terms" set y to checkModifier("command") end tell
set x to script "Check modifier with terms" set y to x's checkModifier("command")
set x to script "Check modifier with terms" tell x set y to checkModifier("command") end tell And if it uses terminology:
tell script "Check modifier with terms" set y to check for modifier modifying key "command" end tell
set x to script "Check modifier with terms" using terms from script "Check modifier with terms" tell x to set y to check for modifier modifying key "command" end using terms from
I'd love the core language itself to have a bit more power, so that it wouldn't be as necessary to switch to the latest gee-whiz alternative(s).
I don't think anyone would argue with that sentiment.
|