diagnostics

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
berndg
Posts: 17
Joined: Thu Mar 22, 2012 3:37 pm

diagnostics

Post by berndg » Mon Mar 26, 2012 8:04 pm

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.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: diagnostics

Post by mwieder » Mon Mar 26, 2012 8:21 pm

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:

Code: Select all

on mouseUp
  grunt
end mouseUp

function grunt
  answer "hello"
end grunt
and got an error 573 on line 2 in handler mouseUp, which is "can't find handler".

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: diagnostics

Post by dunbarx » Tue Mar 27, 2012 3:37 pm

Column number? What and where are these? I requested an x-value gauge long ago, since counting chars is, as you say, tedious.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: diagnostics

Post by mwieder » Tue Mar 27, 2012 5:10 pm

Craig-

I believe that's exactly the point of the OP's "(I think)".

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: diagnostics

Post by jacque » Tue Mar 27, 2012 5:50 pm

Column number = character offset in the line.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: diagnostics

Post by mwieder » Tue Mar 27, 2012 6:24 pm

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.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: diagnostics

Post by jacque » Tue Mar 27, 2012 6:29 pm

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

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: diagnostics

Post by FourthWorld » Tue Mar 27, 2012 6:57 pm

mwieder wrote:The point being that there's no ruler along the bottom to tell you the character position in the line.
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.

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: diagnostics

Post by mwieder » Tue Mar 27, 2012 7:14 pm

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.

Post Reply