PDA

View Full Version : warnings in debugger


thriputapriya
01-17-2005, 01:57 AM
Hi Antun,

In my example code(which i have attached with this post),at the running time,i am deleting a selected image, after that if i click on any other remaining image,i am getting these error warnings are in debugger,

example.lzx:52: reference to undefined property 'crb'
example.lzx:52: undefined object does not have a property 'setVisible'
example.lzx:53: reference to undefined property 'crb2'
example.lzx:53: undefined object does not have a property 'setVisible'


So,please could you rectify this error in my code .

Thanks in advance,
-thirputapriya

metasarah
01-20-2005, 05:15 AM
This is a nice example of using the selectionmanager to select objects and this is a common error when deleting something controlled by the selectionmanager.

The object that you deleted was still referenced by the selection manager. If you delete it, then the selection manager will still try to unselect it, and you get a warning because the object does not exist.

When deleting, unselect it first, by calling clearSelection() on the selectionmanager.

Sarah

p.s. this would be nice to add to the user FAQ of the wiki