Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!shelby!labrea!daemon From: combs@sumex-aim.stanford.edu (Dave Combs) Newsgroups: comp.sys.next Subject: Re: copying Controls (Buttons) Message-ID: <23998@labrea.Stanford.EDU> Date: 25 Jul 89 14:57:41 GMT Sender: daemon@labrea.Stanford.EDU Lines: 24 Michael, If I want to make a direct copy of a Button, INCLUDING all its various properties (action, key, enabled, etc.), the copy method (either in Button itself or through the global Object method) should be either explicitly allowed, or explicitly disallowed (by overriding with a null-action method, for example). I don't believe it is reasonable to expect that to duplicate a button I have to make a new button, then go through each of the properties in the new button and set each one to the result of fetching the same property from the original button. That's what "copy" is supposed to do for me. Otherwise, why have it? Also, I'm not assuming these two Buttons are in a matrix. (I've had similar problems trying to free unused cells in a matrix and having one free corrupt the prototype cell from which the matrix elements were created). Once again, is it an error to send "copy" to a Button and expect it to generate a copy of the ButtonCell, too? As is, if I free the second Button, the first is subsequently corrupted because its ButtonCell is released. (At the very least, this is inconsistent--if you create a copy without copying the ButtonCell, you should free the copy without freeing the ButtonCell. Correct?) Comments? Dave