|
-
Nov 14th, 2008, 09:37 AM
#1
Re: How to copy an object?
You have to copy it manually. Setting A=B, only makes A & B reference the same object. So, depending on what Object is, perform necessary action to reproduce it. For example, if it were a picture, use LoadPicture() to load the image into a different object. If it were a custom class you created, you should build a function that copies itself to a new passed object, initialized with the keyword New: Set [variable] = New [Object]
-
Nov 14th, 2008, 09:40 AM
#2
Thread Starter
Addicted Member
Re: How to copy an object?
 Originally Posted by LaVolpe
You have to copy it manually. Setting A=B, only makes A & B reference the same object. So, depending on what Object is, perform necessary action to reproduce it. For example, if it were a picture, use LoadPicture() to load the image into a different object. If it were a custom class you created, you should build a function that copies itself to a new passed object, initialized with the keyword New: Set [variable] = New [Object]
wow..
ok
my object here is collection (of a thousand elements).
so the only way is to use for each statement to copy the elements?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|