Context-free error messages during debugging

Graham Samuel livfoss at mac.com
Sun Oct 15 13:29:34 CDT 2006


On Sun, 15 Oct 2006 01:58:48 +0200, Mark Schonewille  
<m.schonewille at economy-x-talk.com> wrote:

>> Hi Graham,
>>
>> You could adjust the message box to throw errors instead of
>> displaying them in its lower field, but it is probably easier to
>> create your own message box and save that as a plugin. Just make a
>> palette window with a field and the following script:
>>
>> on enterInField
>>    do me
>> end enterInField
>>
>> This kind of errors (Chunk: can't find card) occurs after referring
>> to a property of a nonexisting card, such as
>>
>> put the bla of cd x
>> put the name of btn x of cd y
>>
>> Sorry, there are too many possibilities to give an exact cause of the
>> error, but I hope this helps anyway.

Mark, thanks for replying, but I remain confused. What I am saying is  
that I don't see that the engine has any excuse for not telling me  
the full context of an execution error, and I wonder why it does this  
sometimes and not at other times. I think it is worthy of reporting  
as a bug (at least a bug in the IDE), but to do this I need to  
understand more about how and why these 'context-free' reports  
appear. I'm a bit surprised we don't hear more about them from other  
developers.

Also, I couldn't follow your idea of creating my own message box - I  
am only looking at the message box because that's where this context- 
free error report appears; otherwise it is not implicated at all.  
What would 'do me' do, exactly? I am not trying to run scripts in the  
message box, I'm just running them regularly in objects like  
applications normally do.

Graham

>>
>>
>> Op 15-okt-2006, om 1:31 heeft Graham Samuel het volgende geschreven:
>>
>>
>>> One of the most irritating aspects of debugging in Rev (or in
>>> Galaxy for that matter) is that there are circumstances (usually
>>> when a rev app starts up) when you can get an error in the message
>>> box, such as
>>>
>>>
>>>> Message execution error:
>>>> Error description: Chunk: can't find card
>>>>
>>>
>>> with no other context given, i.e. the IDE's debugging display is
>>> not invoked. This seems absurd, since the engine can't have
>>> interpreted the script all without knowing which line of which
>>> script it was executing, as well as the name of the object it can't
>>> find (in the example above): so this info could and should (IMO) be
>>> provided to the developer.
>>>
>>> Does anyone know
>>>
>>> a) exactly under what conditions this type of error occurs;
>>>
>>> b) if there is a workaround (apart from simply stepping through
>>> every line of script) to find the context of the error.
>>>
>>> TIA
>>>
>>> Graham
>>>


------------------------------------------------------------------------ 
---
Graham Samuel / The Living Fossil Co. / UK and France




More information about the use-livecode mailing list