[Gambas-user] Question about Object.delete

na2492 at ...9... na2492 at ...9...
Wed Mar 31 23:50:16 CEST 2004


>On Wednesday 31 March 2004 22:25, Charlie Reinl wrote: 
>> Salut, 
>> 
>> if I create an Object, I can ask 'if Object = NULL then', but what is to

>> do, to have the same state after 'Object.delete', because it is NOT NULL.

>> (see snapshot) 
>> Like you can see on the snapshot the project does not make a lot. 
>> If the Object = NULL then it creates a TreeView and if it is <> NULL it 
>> deletes the Object. 
>> But if you have a seconde click on Button2 then you'v get an Error! 
>> 
>> Amicalement 
>> Charlie 
> 
>The Delete method destroy the control pointed by the Gambas object, but it
 
>does NOT destroy the Gambas object itself, and so the variable is not set to
 
>null. 
> 
>When the underlying object of a Gambas object is destroyed, the Gambas 
object  
>becomes "invalid". So, the error message! 
> 
>Regards, 
> 
Salut Benoit, 
 
And what is to do in that case ? 
 
'if Object = INVALID then' or what ? 
 
 Amicalement 
Charlie 
 
* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *




More information about the User mailing list