diagnostics
Moderator: Klaus
diagnostics
Anyone who ever wrote a compiler or interpreter knows that the easiest error recovery tool reports "an error occurred at line X," and knows that meaningful error messages aren't cheap and aren't easy. I think LiveCode has lowered the standards to a new level though. Just try a simple mistake of declaring a routine as a function but calling it as a command (i.e. the caller does not put the result anywhere). I forget the exact words; I think it is something like "script error at line Y (column X)" (where, to add insult to injury, the column number does not match the visually perceived column number subject to tabs and whitespaces (I think)).
As stated in a previous post, I enjoy exploring LiveCode because it is different and novel to me, but I seriously can't see what the folks at runrev have been doing for five major versions.
As stated in a previous post, I enjoy exploring LiveCode because it is different and novel to me, but I seriously can't see what the folks at runrev have been doing for five major versions.
Re: diagnostics
Points mostly well taken (but do take a look at PowerDebug's runtime error handling <g>). However, I just tried what I think is your example:
and got an error 573 on line 2 in handler mouseUp, which is "can't find handler".
Code: Select all
on mouseUp
grunt
end mouseUp
function grunt
answer "hello"
end grunt
Re: diagnostics
Column number? What and where are these? I requested an x-value gauge long ago, since counting chars is, as you say, tedious.
Re: diagnostics
Craig-
I believe that's exactly the point of the OP's "(I think)".
I believe that's exactly the point of the OP's "(I think)".
Re: diagnostics
Column number = character offset in the line.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: diagnostics
The point being that there's no ruler along the bottom to tell you the character position in the line. You have to guess at it or count chars, which isn't easy when you're trying to guess how many spaces a line is indented or other whitespace chars... not to mention being a pita.
Re: diagnostics
Ah right. Sorry. My head is so pointy that other people's points just slide right off.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: diagnostics
It seems being a MetaCard user has me at a disadvantage on this: in MC, when you open a script editor from the ExecErr dialog it places the insertion point right before the offending token.mwieder wrote:The point being that there's no ruler along the bottom to tell you the character position in the line.
Does this not happen in LC?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: diagnostics
I do that from PowerDebug if the user is running glx2 as a script editor, but otherwise the IDE's script editor only lets me specify the line number, not the character position.