Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copying an Object - avoiding single object references
Message
 
To
03/05/2000 20:42:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00365455
Message ID:
00366851
Views:
19
>>The easy answers don't work in this scenario: Using the .Class property to create a new instance (some objects such SCATTER NAME don't have a Class member, nor would the properties contain the proper typed values, nor would nested subobjects or arrays be there).
>
>Using AMembers() and running right down the list adding and changing all non ReadOnly properties can take care of the second two, if you can instantiate a new class using the class property. Would it just be possible to trap if there is no class property and create a custom class then do the same? I don't use SCATTER NAME objects (just played).

Well, it has to be generic and I personally use SCATTER NAME object in all of my business objects to hold table based data, so I can bind to the object on forms and Web pages.

I already have code that can walk through an object and recreate it, then add properties I guess, but the problem is that it's slow. If you have a largish array this will be dreadfully slow and all that just to get an object structure in this case.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform