>>There is a substantial difference. Object added as a property is just a property which is an object pointer, but that object isn't a member (i.e. its .parent is null, it's not among oObject.objects). OTOH, oObject.addobject(...) and oObject.NewObject(.....) will create a member object. For the outside world this new object behaves the same (the syntax oObject.newlyaddedobject.property will be the same), but newlyaddedobject.parent=oObject, and newlyaddedobject is a member of oObject.objects collection.
>
>OK, but my original question was about the difference between AddObject() and NewObject() - not AddProperty().
Hilmar,
Did you see my original reply? Just curious, because I basically said the same as Sergey.
If it's not broken, fix it until it is.
My Blog