library of subroutines - help needed
library of subroutines - help needed
- Subject: library of subroutines - help needed
- From: Ken Victor <email@hidden>
- Date: Sat, 16 Dec 2000 16:28:16 -0800
i would like to have a compiled script that uses various "plug in"
scripts in separate compiled script files. in the main script i would
like to have a number of utility routines that could be used by each
of the plugins. i can successfully load and execute the plugins;
however, i haven't been able to figure out the proper syntax in order
to be able to use routines in the main script from the plugins.
my main script is something like:
on run()
...
DoDelete()
...
end run
on DoDelete()
set DeleteScript to (load script file DeleteScriptName)
tell DeleteScript to DoIt()
end DoDelete
on LogMessage( theMessage)
...
end LogMessage
and then the delete plug in might be:
on DoIt()
...
LogMessage("from Delete PlugIn")
...
end DoIt
its the call to LogMessage in the plugin that doesn't seem to work.
i've also tried using:
tell parent to LogMessage("from Delete PlugIn")
and this doesn't work either
is this kind of structure possible? (it seems like it should somehow
be possible.) and if so, how do i get it to work?
thanx,
ken