Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assigning SCATTER named properties
Message
 
 
To
06/10/2001 10:40:15
Ing. T.R.M. Pluym
Pluym Elektronics Bv
Hulst, Netherlands
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00565148
Message ID:
00565149
Views:
23
This message has been marked as the solution to the initial question of the thread.
See corrections in bold below

< snip >
>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
* 1 as a 3rd parameter creats two-dimentional array. 
* To get properties only don't pass 3rd parameter at all. 
AMEMBERS(laTemp1, loTemp1 )  

FOR nX = 1 TO ALEN(laTemp1)
   * laTempArray holds properties of loTemp1. 
   * There's no need to check if they exist again
  IF TYPE('loTemp2.' + laTemp1[nX])<>'U')
        *You dont need macro substitution here, name expression'll work just fine
        STORE EVAL('loTemp2.' + laTemp1[nX]) TO  ('loTemp1.' + laTemp1[nX])
  ENDIF
ENDFOR
>But doesn't work..
>
>Any tips, or a easier way to fix the problem ?
>
>Thanks in advance..
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform