[Gambas-user] Killing objects? Urgent

Eilert eilert-sprachen at ...221...
Thu Dec 22 11:22:51 CET 2005


Benoit Minisini schrieb:

>On Wednesday 21 December 2005 18:13, Eilert wrote:
>  
>
>>Benoit Minisini schrieb:
>>    
>>
>>>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!
>>>      
>>>
>>Ok, good to know :-)
>>
>>The question now is: How do I catch events from these controls?
>>    
>>
>
>mTxt[i] = NEW TextBox(Maske) AS "NameOfTheEventHandler"
>
>Read the documentation about NEW on the wiki if you want more details...
>
>Regards,
>
>  
>
Aaaah, c'est LAST n'est-ce pas? C'est genial! Merci!

Rolf





More information about the User mailing list