>Dear Experts,
>
>This.myProperty = NEWOBJECT( "myClass", "myClassLib" )
>
>This.NewObject( "myProperty", "myClass", "myClassLib" )
>
>
>Are the two statements above same? If not, how are they different? Can they be used interchangeably?
Almost the same. In the first case, however, the object is standalone, and the property holds a reference to the object. The object doesn't have a parent. Parent can reference it, but it can't reference the parent, unless you find a way to pass a reference to it.
In the second case, the object is a member of This, and This is its .Parent, i.e. the object becomes a full member of the containership hierarchy.