Fabio,
Of course...
But the member Page1 is in class definition.
What is correct?
- removing all information about member Page1
- or don't removing member Page1
- (now is only half way)
And different behavior:
Designe - you cannot remove class's members in derived class or object
Programmayticaly - You can remove ....
MartinJ
>>Hi Fabio,
>>
>>This behavior is knowly from VFP 3.0 with container class.
>>I don't know if is BUG or designe behavior.
>>
>RemoveObject cannot make half operation,
>and to leave pieces for road.
>
>>
>>I have first rule:
>>- If container class contains any object member then I don't remove it/them.
>>
>>MartinJ
>>
>>>>Fabio,
>>>>
>>>>Not a bug. Since the class is defined with one member element, that element can't be fully removed at runtime.
>>>>
>>>
>>>Before writing you should verify!
>>>
>>>
>>>CLEAR
>>>=NEWOBJECT("pageframe1")
>>>
>>>DEFINE CLASS pageframe1 AS PageFrame
>>> Pagecount = 1
>>>
>>> PROCEDURE Init
>>> ? "Pagecount is",this.Pagecount
>>> ? "Now remove the page1",this.RemoveObject("Page1")
>>> ? "Pagecount is",this.Pagecount
>>> ? "this.Page1 is a ",this.Page1
>>> ? "AMEMBER(PAGE1) = #",AMEMBERS(AMM,this.Page1)
>>> ? this.Page1.Name
>>>ENDDEFINE
>>>