MACSCRPT Archives

May 2010

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tetsuro KURITA <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 26 May 2010 01:44:27 +0900
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
ModuleLoader is a module loading system for AppleScript. It allows you to load scripts as modules with specifying only their names. 

http://homepage.mac.com/tkurita/scriptfactory/en/XModules/contents.html#ModuleLoader

The standard way to load modules/libraries of AppleScript is "load script" command. The problem of the command is that you must pass a full path of a module. You must manage everything for modules by hand.

ModuleLoader introduces a modern module system for AppleScript. You can 
load and manage modules with minimum efforts like other scripting language
(e.g. Perl, Ruby). 

Some examples :

== A top level script

property Module1 : module
property loader : boot (module loader) for me

== A module which depends on other modules.

property Module2 : module

The "module" command in the property definition mark the property as a place
where a module is loaded into. "boot (module loader) for me" statement cause
actual loading modules and set the modules to the specified properties. 

I believe ModuleLoader could be the best solution for a module loading system
of AppleScript. Please check details of ModuleLoader with the manual.

I welcome any comments, suggestions and questions, even if it's negative.

=======================================================
Tetsuro KURITA
E-mail: [log in to unmask]
http://homepage.mac.com/tkurita/scriptfactory/en/
=======================================================

ATOM RSS1 RSS2