• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Libraries and effiency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libraries and effiency


  • Subject: Re: Libraries and effiency
  • From: Philip Aker <email@hidden>
  • Date: Mon, 9 Aug 2010 04:56:55 -0700

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.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Libraries and effiency
      • From: Tommy Bollman <email@hidden>
    • Re: Libraries and effiency
      • From: Tetsuro KURITA <email@hidden>
References: 
 >Re: Libraries and effiency (From: Tommy Bollman <email@hidden>)
 >Re: Libraries and effiency (From: Tetsuro KURITA <email@hidden>)

  • Prev by Date: Re: Libraries and effiency
  • Next by Date: How to speed up execution time of this script
  • Previous by thread: Re: Libraries and effiency
  • Next by thread: Re: Libraries and effiency
  • Index(es):
    • Date
    • Thread