Re: Libraries and effiency
Re: Libraries and effiency
- Subject: Re: Libraries and effiency
- From: Tetsuro KURITA <email@hidden>
- Date: Tue, 10 Aug 2010 12:06:14 +0900
Thanks for many interesting opinions.
> So, if the top level folder interface is consistent between several loaders, then it makes it easy for users to understand that part ― don't have to read any manuals.
I think there are not places for several loaders.
Loaders should be focused to one for source code compatibility.
It's different from editors.
I hope ModuleLoader or successors will be the de facto standard of AppleScript'
s library loader. But it is good that someone will develop better loading scheme
than ModuleLoader's one.
> I keep my ~/Library/Scripts folder on a removable disk (/Volumes/Kobi/Beef/Scripts) so I have the same scripts no matter what machine I'm working on. The Scripts folder in my home Library folder is a symlink to that. So you just can't assume it's the same path all the time. In fact a lot of engineers at Apple keep their home folders on removables because they have to test on many different machines and want to have a consistent environment to work in.
In the case of ModuleLoader, you can add locations by "set additional module paths to" command.
>> Why don't library locations are always searched recursively ?
>
> Modules
> Modules/some.scpt
> Modules/other.scpt
> Modules/FileUtilities/EasyChooseFile.scpt
> Modules/FileUtilities/EasyChooseFolder.scpt
> Modules/Dates/ISODateConverters.scpt
> Modules/Dates/WeekdayIntervals.scpt
>
> So let's say I want only scripts from Modules, and Dates. Then if I specify Modules::SearchRecursively = false, my default configuration looks like:
>
> Top Level + Dates Configuration:
> Modules (path:~/Library/Scripts/Modules)
> Dates (path:~/Library/Scripts/Modules/Dates)
>
> and no scripts from Files will be loaded. That is what I want today but maybe next week I need only the Files and Data folders and no scripts from top level Modules. Easy with a different configuration.
I feel your requirements is very rare.
In the case of ModuleLoader, you can use sub-path instead of a module name.
This feature allow you pinpoint specifying a module.
Can this feature help you ?
I believe we can find better solutions.
>> If your suggestion will solve real person's real problem, I will follow your suggestion.
>
> I believe the shared property list notion will help to make libraries more popular and easier to use. It will enable different loaders to specialize -- maybe some more dynamic, and some more static creating library packages. Maybe more competition will create loaders with more features. Maybe a "Kurita Configuration" just right for your loader. Maybe other tools that use certain configurations for publishing scripts, emailing them to a group, or backup. A launch daemon to refresh the Network path. Lots of possibilities.
I can not agree exchanging configurations depending on situations.
It's messy solution.
My answer for such problems is ModuleLoader's "local loader" function.
This feature allow you to prepare projects/tools centric library tree.
Please consider to use ModuleLoader's "local loader".
> Another aspect is that if readers of the AppleScript list see the idea being developed as the messages go by and then some products using it, then they will feel comfortable using those utilities. More users for you. It's very easy to script a property list so AppleScript users can contribute utilities like configuration managers as well.
You can access ModuleLoader's configuration through OSAX commands. Even now we can develop a helper application for loader's configuration.
> Thanks and BTW, I looked at your code. I've been writing for 15+ years and never saw a coding style so close to mine as yours. That was a real surprise for me because it was so easy to read! Maybe you have also spent a lot of time with Carbon AE and OSA?
I'm still a novice of Carbon AE and OSA.
My coding style just follows sample code I could found on WWW.
I might watch your code.
=======================================================
Tetsuro KURITA
E-mail: email@hidden
http://homepage.mac.com/tkurita/scriptfactory/en/
=======================================================
_______________________________________________
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