• 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: Allocation during awakeFromNib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allocation during awakeFromNib


  • Subject: Re: Allocation during awakeFromNib
  • From: Jesse Douglas <email@hidden>
  • Date: Fri, 2 Jan 2004 17:20:59 -0500

On Jan 2, 2004, at 2:40 PM, Darrin Cardani wrote:

I have a subclass of NSMovieView. In the subclass I need to allocate
an NSMutableArray during initialization. Normally, I'd do the
allocation in one of the init methods, but it doesn't appear that any
of the init methods get called. (I've overridden -initWithFrame: and
-init, and neither is ever called.) The problem is that -awakeFromNib
returns void, rather than id, so I can't return NULL if the
allocation fails.

So what is the proper thing to do here? Is there an appropriate
exception I can raise for this? Or is there somewhere else I should
be doing this allocation?

Try overriding -initWithCoder:.

--
Jesse Douglas
Smiley Happy Software
email@hidden
http://www.smileyhappysw.com/
_______________________________________________
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.

  • Prev by Date: Antialiasing and printing
  • Next by Date: Re: [OT] Encryption
  • Previous by thread: Re: Allocation during awakeFromNib
  • Next by thread: Re: Can we make a Panel be displayed even when it is deactivated?
  • Index(es):
    • Date
    • Thread