AppleMods Loader - third time's the charm
AppleMods Loader - third time's the charm
- Subject: AppleMods Loader - third time's the charm
- From: has <email@hidden>
- Date: Wed, 6 Jan 2010 21:46:51 +0000
Hi folks,
I'm working on a new version of Loader, a third-party AppleScript module loading system for Mac OS X 10.4 and later, to be publicly released in early March. For those not familiar with Loader, here's a simple example that loads and uses a module named "List":
(* Boilerplate code for importing modules via Loader *)
-- Declare the module(s) to be loaded:
property _List : missing value
on __load__(moduleLoader)
tell moduleLoader
set _List to loadModule("List")
end tell
end __load__
-- Load the module(s) into this script when it's compiled:
property _ : (AppleMods Loader)'s initScript(me)
(* Rest of the script goes here... *)
-- Send a command to the List module:
_List's sortList({5, 1, 6, 4, 2, 3})
--> {1, 2, 3, 4, 5, 6}
Some features of the Loader system:
- A simple, easy-to-use interface.
- Any .scpt or .scptd file can be used as a module, as long as its name follows a few simple naming conventions; no special packaging required.
- Bundle-based .scptd and .app files can contain their own private modules in their internal Scripts folder.
- Scripts can load modules at compile- and/or run-time. The loading process is recursive, allowing your script to load any number of modules, and those modules to load other modules, and so on. Even circular dependencies are supported (e.g. where module A imports module B, and B imports A).
- You can install multiple versions of the same module (Math-0.2.0.scpt, Math-0.3.0.scpt, Math-0.3.1.scpt) and Loader will automatically load the newest version.
- Scripts can optionally restrict Loader to loading specific version(s), e.g. loadModule("Math ≥ 0.3.0").
- Compiled scripts and applets can be distributed without any external dependencies; while the Loader system uses a scripting addition, AppleModsTools, to attach the Loader module to scripts at compile-time, it is not required to run those scripts.
- SDEF-based documentation for easy viewing in AppleScript Editor.
While the Loader module itself is pretty much done (and working very nicely), it could really use some user feedback and field testing; in addition, the existing AppleMods modules require some general cleanup and their documentation converted to SDEF format.
I know there are some folks here who have used Loader before; if anyone would like a copy of Loader 0.12.0 to play with for now, drop me a note off-list and I'll be happy to send over a copy. (You'll find the Loader interface and module packaging scheme are greatly improved over previous versions.) In addition, if anyone would be interested in helping to update the other AppleMods modules, while it's not the most exciting work I would be very grateful.
Cheers,
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
_______________________________________________
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