Re: solutions to scripting addition terminology confilicts (i.e. the osax namespace problem)
Re: solutions to scripting addition terminology confilicts (i.e. the osax namespace problem)
- Subject: Re: solutions to scripting addition terminology confilicts (i.e. the osax namespace problem)
- From: Joe Kelly <email@hidden>
- Date: Tue, 22 Jan 2002 14:26:02 -0800
<ramble on_and_on="true">
How about lazy namespaces. That is, allow a script author to specify exactly
what additions the script uses, or specify none at all. The point being that
if namespace incursion becomes a problem for scripters, there is a mechanism
in place, ready to be adopted when the time is needed.
Add a keyword "uses addition" which goes up near a script's properties, and
allows you to specify what additions your script uses. If a script does not
have a "uses addition", it will use all the osaxen in scripting additions.
Maybe even have a "prefers version" parameter to specify which verison of
the addition your script will run with. It won't launch if the requested
addition is not present -- which to me is nicer than having the script just
die after 20 minutes (ie: script doesn't understand the "parse xml"
message):
uses addition "Bar's Commands" prefers version {minimum:"1.6.0.0",
maximum:"1.8.0.0", excluding: {"1.6.1.2", "1.7.3.0"}} -- sorry about the
ugly vers string
Then extend the "using terms from" to include additions, so that the script
author can explicitly designate which addition to use for a given case
(note: such explicit designation would hopefully be rare, but it's good to
have the mechanism around):
using terms from addition "Foo's OSAX"
set theTree1 to parse xml inFile
end using terms from
Additionally, if a particular osax is not found prior to running the script,
the user can press the "Search Internet..." button and... well you can guess
the rest.
This approach won't break existing scripts, and allows scripters a migration
path to a more specific namespace interface.
I also think "additions" should be implementation independent -- generalize
the osax interface a bit so that it works with apps, code fragments, unix
tools, java beans, other scripts, or anything foolhardy enough to adopt such
an inteface.
joe
ps -- what about this:
prefers applescript version "1.6.0.0" -- automatically fetches the correct
verion of AppleScript from the server... okay, nevermind.
</ramble>
>
-----Original Message-----
>
From: has [mailto:email@hidden]
>
Sent: Tuesday, January 22, 2002 6:34 AM
>
To: email@hidden
>
Subject: Re: solutions to scripting addition terminology confilicts
>
(i.e. the osax namespace problem)
>
>
>
Various folk wrote various things about stuff...
>
>
[snip]