[Gambas-user] Killing objects? Urgent

Benoit Minisini gambas at ...1...
Wed Dec 21 13:30:12 CET 2005


On Wednesday 21 December 2005 13:22, Eilert wrote:
> Benoit Minisini schrieb:
> >On Wednesday 21 December 2005 10:01, Eilert wrote:
> >>I think I've got it. This way, it uses the .Delete method of the
> >>TextBoxes themselves. Only after that, the array is cleared:
> >>
> >>    FOR i = mTxt.Count - 1 TO 0 STEP -1
> >>      mTxt[i].Delete
> >>    NEXT
> >>    mTxt.Clear
> >>
> >>This seems to do what I wanted - is it correct, or will it crash one day?
> >>
> >>Rolf
> >
> >Clear() only clears the text inside the textbox. It is equivalent to do
> >mTxt.Text = ""
> >
> >But Delete() effectively destroys the control.
> >
> >Wasn't the documentation clear ?
> >
> >Regards,
>
> The documentation was clear, but I couldn't find how to kill the single
> controls.
>
> What I tried first was just mTxt.Clear, which should clear the array but
> did not kill the controls. But I didn't try mTxt[i].Clear as I clearly
> saw the difference :-)
>
> So, is it ok the way it's shown above?
>
> Rolf
>

Yes!

-- 
Benoit Minisini





More information about the User mailing list