• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IB calling init of AppKit subclass [was Re: Window Styles]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: Window Styles (From: Mark Thomas <email@hidden>)
 >Re: Window Styles (From: Jeremy Dronfield <email@hidden>)
 >IB calling init of AppKit subclass [was Re: Window Styles] (From: Brent Gulanowski <email@hidden>)
 >Re: IB calling init of AppKit subclass [was Re: Window Styles] (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: Subclassing appendFormat: for NSMutableString?
  • Next by Date: Re: Subclassing appendFormat: for NSMutableString?
  • Previous by thread: Re: IB calling init of AppKit subclass [was Re: Window Styles]
  • Next by thread: Re: Window Styles
  • Index(es):
    • Date
    • Thread