On May 20, 2008, at 8:55 AM, Andy Lee wrote:
You could add a category to NSObject like this:
- (void)copyProperties:(id)otherObject
(nitpicking myself)
-copyPropertiesFrom: would be a better name. And I would add an ugly
prefix to avoid collision in case Apple adds a method of the same
On May 20, 2008, at 6:17 AM, Liviu Andron wrote:
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: he
1) NSCell is often used along with the Prototype design pattern. See the
-setPrototype: method of NSMatrix. When so configured, NSMatrix copies its
prototype cell as needed to create new instances.
2) Of course NSCell implements . Otherwise it couldn't be used in
Interface Builder becau
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+
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: he MUST copy every property from the origin
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
Am 20.05.2008 um 08:50 Uhr schrieb Liviu Andron:
either: he MUST copy every property from the original NSButtonCell
(font,
attributedTitle, imageDimsWhenDisabled, etc)
That's exactly what you will have to do.
There are cases where this approach is necessary. But you will want to
avoid it
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: he MUST copy every property from the original NSButtonCell (font,
> attributedTitle, imageDimsWhenDisabled, etc).
This is how you will ha
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...
On Mon, May 19, 2008 at 6:00 PM, stephen joseph butler
<[EMAIL PROTECTED]> wrote:
> ButtonCell *bCell = getFromSomewhere();
> MyButtonCell *mCell = new MyButtonCell( &bCell );
Ermm... MyButtonCell *mCell = new MyButtonCell( *bCell ); But you knew that :)
___
On Mon, May 19, 2008 at 5:52 PM, Erik Buck <[EMAIL PROTECTED]> 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...
Butto
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.
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/chapter_3_section_6.html
http://developer.apple.com/documentation
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
///
13 matches
Mail list logo