Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: skip the Assign destroy object or fire a C5 crash
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00893546
Message ID:
00893690
Vues:
18
George,

Nothing of the sort. I'm buffled that you don't understand difference between checking if objects are the same (loObj1 = lObj2) and checking if objects are alike (COMPOBJ(loObj1, lObj2)).
oLabel1 = CREATEOBJECT('Label')
oLabel2 = CREATEOBJECT('Label')
oLabel3 = oLabel1
? oLabel1 = oLabel2 		&& .F. - they're two different objects
? oLabel1 = oLabel3 		&& .T. - the same object
? COMPOBJ(oLabel1, oLabel2) && .T. - Object's are alike but we cannot tell if it's the same object
? COMPOBJ(oLabel1, oLabel3) && .T. - Object's are alike but we cannot tell if it's the same object

oLabel1.Caption = "Two"
? oLabel1 = oLabel3 		&& .T. - still
? COMPOBJ(oLabel1, oLabel2) && .F. - Woops! They are different objects
>
>Sergey,
>
>I think we're picking at nits here. However, in my label example, we have two objects that have exactly the same properties that, when directly compared to each other, return false. Why? Simply because they're not the same variable. One uses COMPOBJ() to determine if all the PEMs are the same, not that they're not the same variable.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform