Initialize a subclass object with a base class object

2008-05-19 Thread Liviu Andron
Problem: I want to extend NSButtonCell (to keep some additional data) => MyButtonCell, but this MyButtonCell objects must be initialized with some base classes object @interface MyButtonCell: NSButtonCell { @private MyData* fData; } +(id)issueWithCell:(NSButtonCell*)cell; @end ///

Re: Initialize a subclass object with a base class object

2008-05-19 Thread Liviu Andron
On Tue, May 20, 2008 at 2:35 AM, <[EMAIL PROTECTED]> (!sic) wrote: > > > > I am not sure I understand the OP's question, but the shortest answer > seems to be to override the super class's designated initializer. > > I think he wants an Objective-C equivalent to a C++ copy constructor. That > is...

Re: Initialize a subclass object with a base class object

2008-05-20 Thread Liviu Andron
On Tue, May 20, 2008 at 10:57 AM, stephen joseph butler < [EMAIL PROTECTED]> wrote: > On Tue, May 20, 2008 at 1:50 AM, Liviu Andron > <[EMAIL PROTECTED]> wrote: > > setRepresentedObject: is a hint, thanks, but it doesn't resolve the > problem > > either

Re: Initialize a subclass object with a base class object

2008-05-20 Thread Liviu Andron
On Tue, May 20, 2008 at 11:38 AM, Nathan Kinsinger <[EMAIL PROTECTED]> wrote: > > 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+

Undo the binding value

2008-03-09 Thread Liviu Andron
troller for every setting. I can try to show the controls as 'disabled' and require the user interaction before => no undo will be generaly necessary, but: - an interface redesign is necessary - the situation can still appear in extreme cases