erroneous error codes

J. Landman Gay jacque at hyperactivesw.com
Thu Apr 22 17:29:43 EDT 2004


On 4/22/04 11:08 AM, Wouter wrote:

> Oops, small correction:
> 
>> on errorDialog which
>>    if length(which) > 5 then put line -5 to -1 of which into which  
>> ### the change
>>   set the executionerror of card 1 of stack "Execution Error" to which
>>   modeless "Execution Error"
>>   send "refresh" to card 1 of stack "Execution Error"
>> end errorDialog

I checked on what Rev is doing and apparently there is something magical 
about line -4 of the error codes. They are apparently having some 
problems with erroneous codes as well, so the following fix may not 
work. However, I seem to be getting good results with the following fix, 
at least during some brief testing. I'd appreciate it if some of you 
could make the following changes to the MC IDE and help me test this.

To implement the fix, edit the script of cd 1 of stack "execution 
error". Make a copy of the handler "refresh" and comment it out for safe 
keeping. Then paste in this revised "refresh" handler:

on refresh
   local lc, em, tei, teo, ter, tec
   put empty into ei
   put empty into eo
   put empty into er
   put empty into ec
   put empty into et
   put empty into field "Error Message"
   put the executionerror of me & cr after ee
   if item 2 of line 1 of ee = 0
   then put line -4 to -1 of ee into ee -- JG
   if lc < 2 or the number of items in ee < 6 then
     hide button "Script..."
     hide button "Debug..."
     put "thrown error" & cr into field "Error Message"
   end if
   repeat with i = the number of lines in ee down to 1
     get item 1 of line i of ee
     put line it of field "Messages" into em
     if em is "Object Name:" then
       put item 4 of line i of ee into tei
       put the long name of tei into teo
     else
       put em & cr before field "Error Message"
       if item 2 of line i of ee is not 0 then
         put item 2 of line i of ee into ter
         put item 3 of line i of ee into tec
       end if
       put tei & cr before ei
       put teo & cr before eo
       put ter & cr before er
       put tec & cr before ec
       put item 4 of line i of ee & cr before et
     end if
   end repeat
   delete last char of field "Error Message"
   seterror 1
   set the hilitedLines of field 1 to 1
end refresh

The main change here is to use line -4 to -1 of the error codes if the 
first line has a target object that is 0. See if this works and let me 
know. As I said, I don't think this is a perfect fix, but it seems to be 
on the right track.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the metacard mailing list