Re: IB calling init of AppKit subclass [was Re: Window Styles]
Re: IB calling init of AppKit subclass [was Re: Window Styles]
- Subject: Re: IB calling init of AppKit subclass [was Re: Window Styles]
- From: Jeremy Dronfield <email@hidden>
- Date: Sun, 16 May 2004 17:39:25 +0100
On 16 May 2004, at 5:04 pm, Ondra Cada wrote:
Brent,
On 16.5.2004, at 16:45, Brent Gulanowski wrote:
I sent a question to the list last week wherein I was subclassing
NSTableColumn. I overrode the designated initializer just as suggested
here, but after changing the custom class attribute, IB stopped
calling
my init method.
Ondra basically implied that that was just how it was and provided a
workaround (no-one answered my follow-up question, btw). Jeremy, are
you now saying that it should have worked? Or does it work for some
classes and not others?
If loading a view *from the framework*, initWithFrame: or similar is
used. If loading your *own* class though, initWithCoder: is used
instead. I believe it is documented somewhere too, since I don't recall
that I hacked it out, and, well, somehow I must have learnt, must I
not? ;)))
In answer to Brent, the designated initializer for an NSWindow subclass
(as in my example) *does* get called. This (I believe) is due to the
fact that NSWindow doesn't support NSCoding.
Regards,
-Jeremy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.