Re: Writing large scripts
Re: Writing large scripts
- Subject: Re: Writing large scripts
- From: "Arthur J Knapp" <email@hidden>
- Date: Thu, 10 May 2001 10:40:24 -0400
>
Date: Wed, 9 May 2001 18:13:24 +0200
>
From: Jan Erik =?iso-8859-1?Q?Mostr=F6m?= <email@hidden>
>
Subject: Writing large scripts
>
I would like to ask those of you who write large programs, how do you organize
>
your code?
>
>
I mean: there is no problem creating a small script, but when I reach a
certain
>
limit it gets cumbersome to have everything in one file.
Right, except that if you have a fully-featured, multi-paned,
handler-property-global-Table-of-Contents-listing,
search/replace-performing, script editor like Script Debugger 2.0,
it isn't so bad. ;-)
>
In a language like C, C++, Java, Pascal, Modula-2 etc I can divide the code
into
>
a number of files and compile each file by itself. Using applescript I can
write
>
a number of scripts and put them into separate files, so far so good. I can
also
>
write "classes" which is nice ... but how do you distribute the finished code?
>
>
In those languages above I link together the separate "files" into an
executable
>
file, but what can I do in AppleScript?
Any evaluated expression typed after a property declaration is "compiled"
into you script:
property StringLib : load script alias "MacHD:Folder:StringLib"
on run
set abc to MakeLowerCase("ABC") of StringLib
Arthur J. Knapp
http://www.stellarvisions.com
mailto:email@hidden
Hey, check out:
http://www.latenightsw.com/freeware/JavaScriptOSA/