Re: Initialize a subclass object with a base class object
Re: Initialize a subclass object with a base class object
- Subject: Re: Initialize a subclass object with a base class object
- From: Nathan Kinsinger <email@hidden>
- Date: Tue, 20 May 2008 02:38:31 -0600
On May 20, 2008, at 1:57 AM, stephen joseph butler wrote:
My high-level goal:
"he wants an Objective-C equivalent to a C++ copy constructor"
You need to go a little higher. WHY do you need a C++ copy
constructor? You talk about someone modifying your nib in IB. Why is
someone doing this w/o understanding the class hierarchy of your
application?
If other people are likely to use the button in IB then maybe you
should consider (if you haven't already) making your own button for
IB. See:
http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBPlugInGuide/Introduction/chapter_1_section_1.html
Then you (or someone else) can use that control to set the state of
the prototype in IB and it will have the extra data ivars or whatever
else you need.
just food for thought...
--Nathan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden