Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I copy an object?
Message
From
17/02/1999 05:25:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00188172
Message ID:
00188311
Views:
18
>I've got a container with an number of Custom objects in it. As I process each object in the container, I may need to create another object in the container which is a copy of one of the existing objects and then change a couple of properties of the new object. When I assign the existing object to the new object, both are referencing the same single object - not separate objects.
>
>How do I create a new object in a container that is a copy of an existing object?
>
>TIA
Hi Leighton,
As an addition, if it's design time, then you could use CloneObject. Get object reference with aselobj().
If not designtime then addobject is the way to go I think.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform