Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddProperty vs AddProp: Best way to solve this questio
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00622271
Message ID:
00622610
Vues:
23
That would work. Might be just as easy to do something like:

GATHER MEMO NAME oSource
if vartype(oSource.FieldInQuestion) = "U"
replace FieldInQuestion with SomeValue
endif


>Mark,
>
>Why not then just create two objects, oSource and oDest? You can initialize the oDest properties that are new, move properties from oSource to oDest, then push oDest into the table.
>
>>It's a data version management issue: Moving a record from an older table to a newer one that has fields not present in the older one. Since the user instigates this on an at-his-need, per-record instance, cannot predict ahead of time exactly which table version he'll be moving from. SCATTER/GATHER work nicely, but to correctly initialize fields that are in the new table only, would be nice to be able add items to a SCATTERed object on the fly when necessary. Then it's all set up to be GATHERED later in the code with all items initialized correctly.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform