[Gambas-user] Question about Object.delete
Benoit Minisini
gambas at ...1...
Wed Mar 31 23:43:54 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,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the User
mailing list