General information
Category:
Object Oriented Programming
Title:
Assigning SCATTER named properties
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..
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only