Re: Libraries and effiency
Re: Libraries and effiency
- Subject: Re: Libraries and effiency
- From: Tommy Bollman <email@hidden>
- Date: Mon, 9 Aug 2010 16:39:31 +0200
Hello.
I am not a library provider, I create tools that works with the different loader system, my loader system if any, is what is shipped with
Applescript in the form of hardcoded library paths, but as such, this is not "mine" I don't have any, and will support all three, (or whatever). I am just having thoughts about what is gainful, and what is not.
Let me repeat my self, to say that the loader system for the different platforms emerged from the "C" language, where the end result was a static executable. And that system is full of flaws when it comes to relying upon that the framework installed with the user, is in such a shape that everything will work.
On 9 Aug 2010, at 13:56, Philip Aker wrote:
> On 2010-08-08, at 22:44:42, Tetsuro KURITA wrote:
>
>> History and other systems show that it's a good way to avoid hardcode paths to libraries.
>
> What I'd like all you library loader developers to do is use my suggestion for a shared property list which contains user designated library folders and his or her search configurations. That way folks can keep track of their own stuff easily and put it anywhere they want.
>
> Tommy has indicated that he's on board and I have been paying attention to his posts. The shell tool at:
>
> curl -O http://www.vcn.bc.ca/~philip/scptlibplist.zip
>
> creates version 0.3 of the property list as an example.
>
> I feel it has some improvements to the previous one in terms of clarity for users and an easier implementation for developers. For ease of discussion, the XML at the end of this post provides a compact description of everything you get from the scptlibplist tool and comments are welcome.
>
> ###
>
> For version 0.4, I will accommodate your remark about hard coded paths. I will add Alias and Bookmark path description possibilities so that library loaders can have the best possible chance to resolve the folder paths. The XML description will look something like:
>
> <library name="Library A">
> <property type="furl" name="Alias" value="9902ED3E-8F8F42698621F7B941EFF1C3…FC2858D507C046A5953B63615AC5388B"/>
> <property type="bool" name="SearchRecursively" value="yes"/>
> <property type="bool" name="AllowOverrides" value="no"/>
> </library>
>
> <library name="Library B">
> <property type="bmrk" name="Bookmark" value="9902ED3E-8F8F42698621F7B941EFF1C3…FC2858D507C046A5953B63615AC5388B"/>
> <property type="bool" name="SearchRecursively" value="yes"/>
> <property type="bool" name="AllowOverrides" value="no"/>
> </library>
>
> ###
>
> Two new functions in OSA.h for 10.6:
>
> OSAGetScriptDataFromURL();
> OSALoadScriptData()
>
> ###
>
> Note that when the shared property list format goes to version 1.0, I can provide any one interested with C code to help with your library loader implementation.
>
> ### Current XML description ###
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <info name="info.libraries.osascript" version="0.3">
>
> <array name="DisabledSuffixes">
> <string>(Disabled)</string>
> </array>
>
> <property type="text" name="DefaultSearchConfiguration" value="Standard"/>
> <array name="SearchConfigurations">
> <configuration name="Standard">
> <string>UserLibrary</string>
> <string>LocalLibrary</string>
> </configuration>
> <configuration name="All Defaults">
> <string>UserLibrary</string>
> <string>LocalLibrary</string>
> <string>NetworkLibrary</string>
> </configuration>
> </array>
>
> <array name="Libraries">
> <library name="UserLibrary" reserved="yes">
> <property type="uri" name="URI" value="Library/Scripts/Modules"/>
> <property type="bool" name="SearchRecursively" value="yes"/>
> <property type="bool" name="AllowOverrides" value="no"/>
> </library>
> <library name="LocalLibrary" reserved="yes">
> <property type="uri" name="URI" value="/Library/Scripts/Modules"/>
> <property type="bool" name="SearchRecursively" value="yes"/>
> <property type="bool" name="AllowOverrides" value="yes"/>
> </library>
> <library name="NetworkLibrary" reserved="yes">
> <property type="uri" name="URI" value="/Network/Library/Scripts/Modules"/>
> <property type="bool" name="SearchRecursively" value="yes"/>
> <property type="bool" name="AllowOverrides" value="yes"/>
> </library>
> </array>
> </info>
>
>
>
> Philip Aker
> echo email@hidden@nl | tr a-z@. p-za-o.@
>
> Democracy: Two wolves and a sheep voting on lunch.
>
Best regards
Tommy Bollman
--------------------------------------------------------------------------------------------------
Mollison's Bureaucracy Hypothesis:
If an idea can survive a bureaucratic review
and be implemented it wasn't worth doing.
_______________________________________________
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