Re: Allocation during awakeFromNib
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.