Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class losing a member
Message
De
15/12/2004 11:32:03
 
 
À
15/12/2004 10:46:36
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Divers
Thread ID:
00969436
Message ID:
00969485
Vues:
11
Dragan,

I've had something like this when using a Treeview.
My "solution" was to make an object reference just before the failing line, then use that full object reference in the (previously) failing line.
oTemp = Thisform.XXXX.yyyy
abc = oTemp.GetKey(.....)

good luck

>>>I have a class which handles SPTs, and it's defined like this:
>>>
>>>
Define Class spt As Table Of Table.prg
>>>	Add Object params As Collection
>>>	cSql=""
>>>	cKeyExp=""
>>>...
>
>>>This doesn't happen regularly - I've tried to reproduce and went for several documents without a hitch. But I've seen it quite a number of times. I've even rebuilt with recompile, and it vanished for a while, then came back this morning.
>>>
>>>Did anyone have something like this?
>
>>Is params or spt destroyed or in the process of being destroyed ? It's the only thing I can see
>>
>>I've had that with textboxes firing some event (forgot which) after, or in the process of being destroyed.
>>
>>I have changed the code to check for the existance of the property prior to accessing it and never have had the problem since.
>
>The point is that it isn't destroyed, it's in a SetParams() method which just sets the properties in a member of the params collection; next it would call .Requery() method wich would create private variables based on the collection. So it's happening during a regular use.
>One thing that may matter - when one document is finished, it's saved using a transaction (both - VFP and SQL).
>
>update: I've added this line before the offending line:
>
assert pemstatus(this,"params",5) message "Params lost"
>And guess what, it didn't fire.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform