comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » object newbie
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: object newbie [message #21343 is a reply to message #21141] Mon, 21 August 2000 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Pavel Romashkin wrote:
>
> marc wrote:
>>
>> ...
>>> 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
>
> I thought that object definition statement can have any number as a
> field definition, and it won't matter, because when new object is
> created, they all will be set to zero anyway. Top base ID will have to
> be placed in that field once it is created, right?
>
> Cheers,
> Pavel

well, no. At least I always like to be sure what is stored in my
fields, hence I rather initialize the ID in my Init method. But
using zero instead of -1 seems ok.

Martin

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie
[[
[[ Bundesstr. 55, 20146 Hamburg
[[
[[ phone: +49 40 41173-308
[[
[[ fax: +49 40 41173-298
[[
[[ martin.schultz@dkrz.de
[[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Modal widgets and Sending Events
Next Topic: IDL: Texture mapping onto DEM

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:34:55 PDT 2025

Total time taken to generate the page: 0.24089 seconds