Duplicate objects [message #61974] |
Tue, 19 August 2008 06:06  |
Wox
Messages: 184 Registered: August 2006
|
Senior Member |
|
|
Hi,
Is there an easy way of duplication IDL objects (not their
references)? You can off course make a new object with obj_new and use
set/getproperty to transfer all properties, but that's a bit silly no?
Thx,
Wout
|
|
|
|
Re: Duplicate objects [message #62037 is a reply to message #61974] |
Wed, 20 August 2008 16:38  |
Mark[1]
Messages: 66 Registered: February 2008
|
Member |
|
|
The SAVE/RESTORE mechanism isn't always too slow. I use it every time
I print a graphics object.
Be aware that copying an object is non-trivial. What do you do with
references to other objects: copy the reference or copy the object?
The former is, I think, called a shallow copy and the latter is called
a deep copy. There are pitfalls in either case.
But didn't some guy called Coyote write an article about copying
objects?
http://www.dfanning.com/tips/copy_objects.html
|
|
|
Re: Duplicate objects [message #62069 is a reply to message #61974] |
Tue, 19 August 2008 06:53  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Wox writes:
> I have always wondered how to do that. I report bugs to
> techsupport@ittvis.com but what about feature requests? Do they have
> some web forms or do I just spam them.
Spam'em. Use all 10000 of your aliases or we don't have a chance. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|