Script Libraries
Script Libraries
- Subject: Script Libraries
- From: Simon Forster <email@hidden>
- Date: Thu, 4 Nov 2004 11:50:11 +0000
Grazing through the list I read one of HAS's posts concerning the
loading of libraries and making sure that they don't have cross
dependencies. An admirable goal but how does one deal with this?
Let me take a specific example.
I have a script which uses 4 different libraries - libFinder,
libString, libMisc and another which I've forgotten. So we have 3
libraries ;-)
These libraries are loaded by the main script and assigned to globals.
Some of the handlers in the libraries use functions defined in other
libraries. These handlers define the appropriate global variables at
the beginning of their code - and the global variables are defined in
the master script.
Is this an adequate guard against cross dependencies? In fact I'm not
too sure how one guards 100% against cross dependencies if using more
than 1 library. Or am I misunderstanding the goal here?
FWIW, each handlers code is wrapped in a try block with any errors
being returned with an identifier to show which handler threw the
original error. This aids debugging no end.
Simon Forster
_____________________________________________________
LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247
_____________________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden