Goodbye stsMLXEditor

Kay C Lan lan.kc.macmail at gmail.com
Mon Aug 31 05:38:05 EDT 2015


On Mon, Aug 31, 2015 at 12:55 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> The script updates aren't actually being done with revXMLeditor. Set is
> never done, its not due to the strict compile error or other errors I don't
> believe.
>
> My apology, poor form, I should have specified OS X 10.9.5, LC 7.1 rc 1

I have no problem using my favourite Text Editor and using stsMLXEditor to
set 'valid' scripts into various objects in LC.

If you set an object a garbage script in the message box, the set
> works, even if the script is non-functional.
>

Yes but did the result report an error? New Stack, 1 button, If I run this
in the msg box:

set the script of btn 1 to "on mouseUp" & cr & "if () then" & cr & "end
mouseUp"

and run it, the result area of the msg box has this:

114,2,4,)
184,2,4,)
166,2,4,)
165,2,4,)

An error output as explained by Mark points to the problem correctly. Yes,
the script gets set but at least I'm told it's bad. Also note that if you
were to open the Script Editor and edit the script for btn 1 to nothing
other than "the quick brown fox" and apply it, you don't get an Error which
is no different to if you 'set the script of btn 1 to "the quick brown
fox". At this stage I'm actually OK with that, at least it's consistent -
no error in either case. The issue I have is where the SE reports an Error
but using 'set the script of ....' does not.

If my Text Editor script has a 'basic' syntax problem, sts pops up a
dialogue to tell me the error - in human format that Mark explained.

As Pete discovered, if errors with your script are related to Strict
Compilation mode (and maybe other more advanced issues) then you don't get
a dialog to tell you there is an error. BUT on my current very basic test
it is still setting the script of the object.

So there is certainly something more complex at play here and my
understanding of what Pete is experiencing is that once he does suffer one
of these Strict Compilation errors sts is no longer keeping his TE and SE
in sync. He looses work which is unacceptable.

So there seems to be a number of issues:

1) You personally don't seem to be able to set ANY scripts with sts
straight out of the box.
2) Pete and I can set VALID scripts OK
3) Basic syntax errors are reported OK, can be fixed and everything remains
in sync.
4) Strict Compilation Mode errors are NOT reported.
    a) For me, and I've only tested very basic scripts, the faulty script
is still set.
    b) For Pete, who's probably testing more complex scripts, at some point
scripts are no longer being set and further changes are lost.
5) If you see other instances where you can set a script in the msg box and
the result is empty, but in the SE it would result in a compilation error,
we need to know.

IMO the heart of this is the failure of Script Compilation errors (and
maybe some others) to be correctly caught and reported by the Engine when
you (sts or whatever) 'set the script of ....'



More information about the use-livecode mailing list