Good find.

If the recipe is consistently reproducible it should be easy and very convenient for scripters to add the presence linefeed chars to the circumstances that will trigger a compilation error.

Have you submitted a request for that?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

Colin Holgate wrote:
A card script that I had made using 4.6.1 was causing a script error in a 
button when used in 4.6.4. The button script had no problem, but it did call 
into an unrelated handler in the same card script where the problem line was.

It turned out that one line in that card script had an invisible line feed 
character in it. The way line feeds is handled changed in 4.6.3, and whereas 
before scripts could have such line feed characters in them without a problem, 
now they can't.

There was a clue to where the problem was, in that on opening the stack there 
was a script error that showed for the line after the one that was the real 
problem. The line it claimed was wrong had no problems, but because of the line 
feed character the error was really referring to the second half of the line 
before the one that was referring to.

Aside from using a bit of abstract thinking to figure it all out, one clue to 
there being a rogue line feed character is that if you comment out the script, 
the letters after where the line feed is located don't turn green. If that 
happens, selecting the line and retyping exactly what you see will fix it.

So, if you have a stack that worked fine with 4.6.2, but shows problems in 
4.6.3 or later, and the line that it's complaining about seems perfectly good, 
comment out the line before that one, and see if the text all turns green. If 
it doesn't, retype the line.

I suspect the line feed got in there in the first place by me copying and 
pasting an example line of code from the documentation. Not the Help perhaps, 
but the earlier iPhone docs.



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to