global is empty

Kay C Lan lan.kc.macmail at gmail.com
Sun Jan 20 18:11:52 EST 2019


On Sun, Jan 20, 2019 at 8:30 AM JJS via use-livecode
<use-livecode at lists.runrev.com> wrote:

> Because with another stack the same principe is working correct. Using
> LC902.

In the odd cases where I've seen this happen (not your problem, but
where the same code works in one stack but not another) my fallback
strategy is to:

clone the stack
select the ENTIRE object's script, not just the function/command that
is misbehaving, and paste it into a text editor.
Delete the script from the object and Save. ie. the script of the
object is now empty.
If your text editor has the function 'Zap Gremlins' (or whatever it's
equivalent is to remove non ASCII characters) use it.  In 99% of my
cases none are found and this is probably completely redundant but
it's belts and braces to ensure only ASCII goes back.
Copy and Paste the script back into it's object.
Save your Stack again.

This has worked for me on many occasions that it's just second nature
now.  Please don't take from that that I do this on a regular basis;
in the early days of 8 & 9, maybe; I'm currently finding the latest
LC9 very usable and haven't needed the above for a good 6-9 months.

I think only once have I ever had to resort to applying the above to
every script of the stack*; but fortunately I had available to me a
very capable scripting language that was able to make very short work
of exporting every script of every object into their own text file ;-)
Once cleaned, and since Revolution 6.7 scriptLimits have been removed,
it was also very easy to reset all the scripts of all the objects.  It
worked!  As your case involves Globals you may need to 'clean' every
script.

*In reality it probably didn't need to be every script of the stack,
there was probably some logical connection with the message path and
the scripts involved; but time wise it was much quicker just to export
every script than try to figure out the message path that may or may
not involve 'the target', behaviour scripts, library scripts, send,
etc etc.

HTH




More information about the use-livecode mailing list