Page 1 of 1
List of Errors
Posted: Fri Oct 22, 2010 4:03 am
by Zephitron
Where is the list of error messages for LiveCode?
I've figured out frOm trial and error that, for example if I leave out "card" or "image" or whatever before the name of an object in a script, the error
"Chunk: error in object expression",
comes up, but it's unclear what that means. Likewise, the other errors are vague.
This is supposed to be an easy, English-like language, but it takes a great deal of time to get the simplest things to work sometimes, in part because of the obscurity of the error messages. (The other aspects that make it difficult are common to any computer language: the exactness (it's English-like only in that it uses English words), the fact that studying the parts doesn't tell you how to put them together, and that the examples only help with what they specifically do. All the rest takes lots of trial and error and experience and thinking and creativity).
I'm surprised there is no list of errors in the User Guide or in the RESOURCE CENTER.
Re: List of Errors
Posted: Fri Oct 22, 2010 10:53 am
by Mark
Hi,
Really, "Chunk: error in object expression" means exactly what it says. You referred to an object but the expression used to refer to the object doesn't make sense to the Revolution engine. For example:
put the bla of "x"
This line returns aforementioned error because the object description doesn't contain a type, which should be "button" in this case.
Best,
Mark
Re: List of Errors
Posted: Fri Oct 22, 2010 6:41 pm
by WaltBrown
Hi Zephitron,
Check out this from the User Guide:
Code: Select all
try
...
catch someError
put line (item 1 of someError) of the cErrorsList of card 1 of stack "revErrorDisplay"
end try
Stack revErrorDisplay has two custom properties, cErrorList and cScriptErrors, which are lists of error messages for use in the IDE. The User Guide indicates that they are only available when using the IDE.
So most of the various error messages are at least listed there.
Walt
Re: List of Errors
Posted: Fri Oct 22, 2010 9:57 pm
by Zephitron
Mark wrote:Hi,
Really, "Chunk: error in object expression" means exactly what it says. You referred to an object but the expression used to refer to the object doesn't make sense to the Revolution engine.
Of course it means exactly what it says, but it's a technical description of a general type. Computer language also means exactly what it says, but in a way that computers understand and is not native to human being. It's why they are called "artificial" or "formal" languages. What it says only makes sense if you already understand what that technical description is referring to, and even then, it's of a general nature only. It doesn't say, "You are missing the general name of the object type before the name of the object instance." or something like that.
I don't know if this is a solvable problem because if the error checker were that smart, the language would be of an even higher level, and the error message would be of a general nature at a higher level too? I guess - I'm not a computer scientist, which is part of the point too).
Mark wrote:For example:
put the bla of "x"
This line returns aforementioned error because the object description doesn't contain a type, which should be "button" in this case.
Best,
Mark
Well of course I understand that *now*. But how can it be made more obvious and clear what the error message means to the person learning ("intuitive" as Apple says)? Again, this is a problem that's not specific to LiveCode, it's a problem with all computer systems, AFAIK (Look at the obscure error messages one gets in operating systems which are supposed to be "user friendly"). LiveCode is advertised as being "English-like", and that's only half true.
I suppose I'm just venting, sorry. But maybe this will help other non-hardcore programmers getting their sea legs to not feel bad if it takes some head-scratchign to figure out what's going on.
Re: List of Errors
Posted: Fri Oct 22, 2010 10:00 pm
by Zephitron
WaltBrown wrote:Hi Zephitron,
Check out this from the User Guide:
Code: Select all
try
...
catch someError
put line (item 1 of someError) of the cErrorsList of card 1 of stack "revErrorDisplay"
end try
Stack revErrorDisplay has two custom properties, cErrorList and cScriptErrors, which are lists of error messages for use in the IDE. The User Guide indicates that they are only available when using the IDE.
So most of the various error messages are at least listed there.
Walt
That's a good tip. I'll see if I can find that object and see if the list is useful or at least interesting.
Thanks.
(Still should be in the docs... anyone out there listening?)