Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initWithFrame not being called on my NSImageView subclass



That makes sense, thank you.

email@hidden
"Such a theory has to be bizarre and elaborate, as well as being stupid"
-- Jim Loy, regarding a hollow earth



On Feb 21, 2008, at 2:00 PM, Kyle Sluder wrote:

On Thu, Feb 21, 2008 at 1:36 PM, Shamyl Zakariya <email@hidden> wrote:
Anybody know why it wouldn't be called? It doesn't appear to be
misspelled.

Re-read the documentation here: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/SubclassingNSView/chapter_6_section_2.html

Short version: subclasses of views that you've put in your nib have
already been instantiated when they were freeze-dried into the nib.
It would be incorrect to call -initWithFrame: again.  That's why you
have -awakeFromNib.

--Kyle Sluder

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >initWithFrame not being called on my NSImageView subclass (From: Shamyl Zakariya <email@hidden>)
 >Re: initWithFrame not being called on my NSImageView subclass (From: "Kyle Sluder" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.