Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assigning SCATTER named properties
Message
From
08/10/2001 04:31:43
 
 
To
06/10/2001 13:32:40
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:
00565387
Views:
19
>With the macro (&) in stead of the EVAL(), it works just fine..
>
>Thanks again...

While your method of copying an object of a SCATTER NAME variety will work with the &, I find it to be too slow. What I do is:

using the table that the scatter name object was created from, create an array of the structure using AFIELDS(), create a cursor from that array, APPEND a BLANK record, GATHER NAME from the original SCATTER NAME object to the new cursor, and then do a SCATTER NAME to a new object, effectively creating a copy. More steps, but much faster.
LOCAL aStruct[1]
SELECT table
SCATTER MEMO NAME oFirst
AFIELDS(aStruct)
CREATE CURSOR temp FROM ARRAY aStruct
APPEND BLANK
GATHER MEMO NAME oFirst
SCATTER MEMO NAME oSecond
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform