[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: object newbie



...
> If you destroy the widget, you set self.tlb to -1, and in your
> cleanup method, you test  IF self.tlb GE 0 THEN widget_control,
> self.tlb,/DESTROY.
Nearly irrelevant, but just for completeness:
Better put self.tlb to 0. Only 0 is garanteed to never be a widget ID.
(Somewere I saw this in the documentation (al least implicit))
and better check with widget_info(self.tlb,/VALID_ID).
Then you did not even need to set it to 0. 
(But  better do since a widget ID might be reused (perhaps same
probability as that it might be -1 ;-))
:-) marc