>>If you rename the class (not the object) then problem would be solved but remember renaming would effect all forms that used it.
>>Cetin
>Cetin,
>I'm not sure I follow you. Do you mean to add a different class as the contained object?
>I cannot add a different class into my container. I must add same class as the container. Even more, the nesting level is undetermined...
>I noticed that if i use base classes, the error doesn't appear. But I cannot make any use of the base class containers..
>Remus
Remus,
You mean you add a class to itself ? In class designer it would cause a cyclic definition (two mirrors looking each other). C1 container would include another C1 which in turn should include C1 including C1 and in turn it should include C1.... and so on, a cyclical definition. But at form level you could do it.
oForm = createobject("Form")
with oForm
.height=400
.width=600
.addobject("m1","mycontainer",300,500)
.m1.addobject("m1","mycontainer",200,400)
.m1.m1.addobject("m1","mycontainer",100,300)
.m1.m1.m1.addobject("m1","mycontainer",50,200)
.m1.visible = .t.
.m1.m1.visible = .t.
.m1.m1.m1.visible = .t.
.show
endwith
read events
define class mycontainer as container
procedure init
lparameters pnHeight,pnWidth
this.height = pnHeight
this.width = pnWidth
endproc
enddefine
Cetin