Notification of compilation
m.schonewille at economy-x-talk.com
Sat Feb 28 16:59:07 EST 2015
When the script editor comes to front, the resumeStack message is
triggered. This runs a resumeStack handler, which compares the content
of the script editor with the actual script of the control, card or
stack. There is no notification, just a simple "if fld x is not the
script of control y then...".
Usually, a script is compiled with a click on the compile button or by
pressing the enter key. Another possibility is when the script editor is
closed (sometimes as a result of closing a stack). You could use a
frontscript to detect a click on the compile button, a press on the
enter key or a closeStack message and check if a script has been edited.
This means that you can detect whether LiveCode is going to compile a
script, i.e. it will use the set command to set the script property.
This may cause a compilation error, which can be detected by checking
the result, but I'm not sure that you can catch this error anywhere but
directly after calling the set command. Unfortunately, there is no way
to catch the set command or the script property.
So, there are ways to detect that LiveCode will compile a script, but
not that it actually happened. If you explain what you need this for, it
might be possible to find a good workaround for this.
Economy-x-Talk Consulting and Software Engineering
Installer Maker for LiveCode:
Buy my new book "Programming LiveCode for the Real Beginner"
LiveCode on Facebook:
On 2/28/2015 19:25, Michael Doub wrote:
> Does anyone know if there is way to detect when a specific objects
> script has be compiled? I am thinking that there must be because the
> script editor seems to know when a script has been changed outside the
> editor. I have been looking thru the IDE stack and have not found a
> clue yet.
> Any ideas or pointers as to where to look?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode