[Gambas-user] Killing objects? Urgent

Eilert eilert-sprachen at ...221...
Wed Dec 21 10:01:19 CET 2005


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


Eilert schrieb:

> This is important for me and my project :-)
>
> I create an input mask dynamically. Here is an example:
>
>
> PRIVATE mTxt AS NEW Object[]
>
>
> DIM tt AS TextBox
>   tt = NEW TextBox(Maske)  'Maske is a TabView which shows the input 
> elements
>   mTxt.Add(tt)
>   mTxt[0].X = 10
>   mTxt[0].Y = 10
>   mTxt[0].Text = "hallo"
>
>
> Now, this will not kill the TextBox, but for my understanding it should:
>
>   mTxt.Clear
>
> How else can I get rid of the objects?
>
> Thanks for every insight.
>
> Rolf
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>





More information about the User mailing list