Notification of compilation

Mark Schonewille m.schonewille at economy-x-talk.com
Sat Feb 28 16:59:07 EST 2015


Hi Mike,

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.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Installer Maker for LiveCode:
http://qery.us/468

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

LiveCode on Facebook:
https://www.facebook.com/groups/runrev/

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?
>
> Thanks
>    Mike
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>




More information about the use-livecode mailing list