Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NewObject() vs AddObject()
Message
De
13/02/2008 07:22:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/02/2008 22:34:39
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01292009
Message ID:
01292081
Vues:
30
>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().
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform