From: Brandon M. <bnd...@ho...> - 2000-11-28 21:55:49
|
You'll be happy to know that I have built a Clone() method into my SuperClass object that I am hoping to release soon. It is only a shallow copy. It is simple to override the clone method in order to properly clone the properties that you know should be copied further. The great thing here is that all objects who use SuperClass as their "Super" class inherit a TON of functionality. (Docs and examples will explain it all.) ----- Original Message ----- From: "Holger Zantl" <h....@at...> To: <dyn...@li...> Sent: Tuesday, November 28, 2000 4:09 PM Subject: [Dynapi-Help] making object copy not reference > Hi, I try to make a menu widget and now I have the Problem that I need > a copy of an object for the submenus, but a simple > "submenuobject = menuobject" references the original object so that any > changes I make to the submenu are made to the parent menu as well. > > Is there a way to make a copy of an object or do I have to build a > new object and copy each value to it, which would heavily increase the > size of the widget? > > for the object functions it's not a big problem, since they're static, > but at the point where I need the copy there may be a lot of changes > done to the properties. > > I hope I wrote understandable > > Yours, Holger > > > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-help |