Debugger fixes bug - expert advise needed!

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sun May 20 08:35:12 EDT 2007


Hi David,

Could you first enlighten us:
Does topView contains a complete reference to an object?

Le 20 mai 07 à 14:25, David Bovill a écrit :

> No - I am not trying to be cryptic - but this one is driving me  
> nuts. The
> problem I have is in a script that creates complex nested objects  
> using
> "copy something to group destination". The script first copied a  
> template
> group and then fills in the subgroups depending on the result  
> wanted. All
> works fine except sometimes :( And sometimes the group that has been
> created, renamed and then positioned - well the controls within it  
> do no
> "exist()"!
>
> I have come across this before, and the reason I am finding it so  
> hard to
> fix is that if I put a breakpoint before the offending line in  
> order to
> debug it - well it starts to work fine - the lines are as follows:
>
>            put the object_FromReferencePath
> ["view_Object/right_View/header_View"] of topView     --   
> mistakenly results
> in empty
>            breakpoint
>            put the object_FromReferencePath
> ["view_Object/right_View/header_View"] of topView     --  is now  
> completely
> fine
>
> The script that does the work is simple:
>
> getprop object_FromReferencePath [objectRefPath]
>    put the long id of the target into someObject
>
>    set the itemdelimiter to  "/"
>    repeat for each item objectRef in objectRefPath
>        if exists(someObject) is false then return empty
>        put the objectRef of someObject into someObject
>    end repeat
>    return someObject
> end object_FromReferencePath
>
> So what could the debugger be doing to "fix" this? Is it to do with  
> the way
> the debugger evaluates a script line? I have spent 4 hours on this  
> and well
> frankly it is impossible to debug :)
>
> I am trying to replicate it with a clean stack to file as a bug  
> report, but
> no joy yet...  it seems only to cause a problem at a certain level of
> nesting or object creation. Clues anyone?


Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
http://www.sosmartsoftware.com/
eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list