Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get a copy of an object ?
Message
 
To
25/08/2000 06:18:20
Dino Liberale
Ministero Lavori Pubblici
Trieste, Italy
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00409129
Message ID:
00409135
Views:
23
Create another instance using CreateObject().

oPippo=CreateObject("pippo")
oPippo.Tag="Something"
oNewPippo=CreateObject("pippo")
oNewPippo.Tag=oPippo.Tag

>I have a custom class 'pippo'
>Now I try to play with objects:
>
>opippo = createobject('pippo') && create opippo object
>opippo.tag = 'something'
>refpippo = opippo && crate a reference to opippo object changes made to refpippo are reflected to opippo.
>
>How to obtain a diffrent copy (not a reference) of opippo with prop tag just set and to be able to change it without reflect to opippo and refpippo ?
>
>Thanks,
>Dino.
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Reply
Map
View

Click here to load this message in the networking platform