Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing Objects (VFP6.0)
Message
De
06/08/2003 11:50:17
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00816763
Message ID:
00817349
Vues:
14
Hi

Still having problems with this, so I'll go into a bit more detail.

The form contains the main first instance of the BizObj which is a reference to a BizObj in a Collection on the form, so let's say BizObj is referencing thisForm.BizObjects.List.Item(1)!

BizObj contains another BizObj called Person, which in turn contains another object called Address.

One of the containers on the form has a property called BizObj and in the refresh will do:
this.BizObj = EVALUATE(this.Source) && this.Source will hold expression "thisForm.BizObj.Person"
In my current situation in which the error occurs, I'm creating a whole new instance in thisForm.BizObj, refreshing the form, and then the container picks up on thisForm.BizObj.Person fine, no problems.

After a 2nd refresh it seems to fail, when it issues the above line of code, the thisForm.BizObj instance seems to lose the Person Object, and it's as if the container "snatches" the instance, rather than referencing it.

I've monitored this in the Debugger and it happens before my eyes, I'm looking at Container.BizObj and thisForm.BizObj.Person and the latter simply dissappears (thisForm.BizObj is still there, just not Person).

Sorry about the level of detail, but this is driving me up the wall. The front-end app is VFP6.0 and the BizObjects are pulled from a VFP8.0 COM DLL.

Thanks, hope this makes sense.
Kev

>Hi Kevin,
>
>Are you sure that this.ObjRef actualy refrence the same object as thisForm.BizObj?
? (this.ObjRef = thisForm.BizObj)    && should return .T.
>
>>Hi
>>
>>I have an Object reference on a container on a form. The form property holds reference to the object (called thisForm.BizObj).
>>
>>If the container alters the object reference like so:
>>
>>
this.ObjRef.Address = CREATEOBJECT("Address")
>>
>>It doesn't actually reflect this change on thisForm.BizObj.Address??
>>
>>Any ideas?
>>
>>Thanks
>>Kev
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform