Hi Dragan,
you're always coming from the back with those cool ideas :)
I really like that approach, but unfortunately the access method doesn't fire :(
Thanks,
Armin
>>Hi,
>>
>>I have a framework container class which hosts another object as a child. I would like to replace the child object with my own. The problem is, my object should have the same name as the original object, so the code in the container class that references the child object is not broken.
>>
>>I know that I can't remove or rename the child object in design mode, so I wanted to do that at runtime. Does anyone see a chance to get rid or to rename the original object at runtime?
>
>After having read the whole thread... I think I may have something:
>
>- subclass the container
>- add oObject_access method to the container, like this:
>
>
if type("this.oReplacement.name")#"C"
> this.addobject( --- add your new object here)
>endif
>return this.oReplacement
>
>The whole idea is to redirect anything that mentions the object you want removed, to the cuckoo's egg you want to show up instead.