| Hi Uli,
I used the Category feature of objc and was amazed when it worked. I added a <clone> method to the Category files for the widget. <Copy> didn't work for the widget I was trying to over-ride. On Apr 16, 2008, at 2:07 AM, Uli Kusterer wrote: Am 15.04.2008 um 18:26 schrieb Baiss Eric Magnusson:
Why isn't there a clone method for <some kind of framework class widget>?
What I generally do when I want to create identical copies of objects is to either use their -copy method if they have one, or to serialze them using NS(Keyed)Archiver and then unarchive them again, if tgey support that. If I have a NIB in which they're specifed, I just load that NIB a second time to get a second copy. See the NSNibLoading category. No idea whether that works in your case, but that works for my Cocoa apps.
Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de
|