Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why isn't there a clone method for UI widgets



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

----

Baiss Eric Magnusson

Cascade Web Design

<http://www.CascadeWebDesign.com>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden

This email sent to email@hidden

References: 
 >Why isn't there a clone method for UI widgets (From: Baiss Eric Magnusson <email@hidden>)
 >Re: Why isn't there a clone method for UI widgets (From: Uli Kusterer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.