Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clone Object
Message
From
02/02/2006 12:50:18
 
 
To
02/02/2006 12:47:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01092951
Message ID:
01092979
Views:
21
>>>Is there simple way to clone object in VFP
>>>
>>>For example
>>>SCATTER NAME loData
>>>loData.ID = 1
>>>Clone loData to loDataNew
>>>loDataNew.ID = 2
>>>and changes in loDataNew property do not change loData property value
>>>
>>>Thanks
>>>Denis
>>
>>No.
>>
>>
>>* COPY
>>FOR K=1 TO AMEMBERS(aProp,m.loData)
>>  ADDPROP(m.loDataNew,GETPEM(m.loData,aProp[m.k]))
>>NEXT
>>
>
>By the word... how do I get empty "loDataNew" object.. for now I do SCATTER twice... but maybe exist way to get empty object ? (wothout properties, methods etc)
>
>Thanks
loDataNew = CREATEOBJECT("EMPTY")
Previous
Reply
Map
View

Click here to load this message in the networking platform