Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assigning SCATTER named properties
Message
De
06/10/2001 10:40:15
Ing. T.R.M. Pluym
Pluym Elektronics Bv
Hulst, Pays-Bas
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Assigning SCATTER named properties
Divers
Thread ID:
00565148
Message ID:
00565148
Vues:
46
Hi,

I have made 2 objects with for 90% the same property names. For example

laTemp1

loTemp1.Name
loTemp1.ZipCode
loTemp1.Street
loTemp1.Fax
...

loTemp2

loTemp2.Name
loTemp2.ZipCode
loTemp2.Street
loTemp2.Memo
...

I like to assign the properties of loTemp1 with the same name as loTemp2 with the value of loTemp2. For example

loTemp1.Name = loTemp2.Name
loTemp1.ZipCode = loTemp2.ZipCode
loTemp1.Street = loTemp2.Street

How can I manage this in code without typing every line.

I allready tried this:

AMEMBERS(laTemp1, loTemp1, 1 )

FOR nX = 1 TO ALEN(laTemp1)
IF TYPE('loTemp1.' + laTemp1[nX])#'U') .AND. ;
TYPE('loTemp2.' + laTemp1[nX])#'U')
lcMacro = 'loTemp1.' + laTemp1[nX] + 'loTemp2.' + laTemp1[nX]
&lcMacro
ENDIF

But doesn't work..

Any tips, or a easier way to fix the problem ?

Thanks in advance..
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform