Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which class is used if 2 classes have same name in class
Message
De
26/05/2016 02:51:49
 
 
À
25/05/2016 19:45:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01634985
Message ID:
01636824
Vues:
50
Hi Dragan:

Nobody should be doing that manipulation with a classlib, because it's a enormous risk doing this. But if anybody do this, then he/she later can't complain about bad or rare behavior.


>>The behaviour is, that VFP simply deletes the old record while safing the class and appends new records to the VCX. So VFP makes shure to get the last - valid - record. For example it does not care about SET DELETED. In older versions of VFP the deleted records in the VCX where never packed.
>
>Except when you have set deleted off and
>
>insert into (targetvcx) select * from (oldvcx) where {condition here}
>
>Then it may insert deleted records as well and you end up with a duplicate. In some cases, when VFP is sure you're alone with a vcx, it may pack it on save (sure does so with a scx), but most of the time it considers the case that two people may be editing different classes from the same vcx at a time, so it just deletes the old and inserts the new. The above scenario will insert both version, and that's probably similar to what happened to Alejandro. BTW, compile classlib also packs it as a table, so those deleted records vanish. I regularly check the size before submitting to source control, and have often delayed a checkin just to compile it.
>
>Funny how this feature managed to sneak its way through the years.
Fernando D. Bozzo
Madrid / Spain
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform