Re: firstResponder KVO snow leopard crash; bug?
Re: firstResponder KVO snow leopard crash; bug?
- Subject: Re: firstResponder KVO snow leopard crash; bug?
- From: "Sean McBride" <email@hidden>
- Date: Wed, 18 Nov 2009 20:06:19 -0500
- Organization: Rogue Research Inc.
On 11/18/09 9:00 AM, Corbin Dunn said:
>Oh -- another thing. Does your subclass of NSCollectionView override:
>
> (void)viewWillMoveToWindow:(NSWindow *)window {
>
>but not call super? If not... call super! Your classes should always
>call super if it is defined in a superclass, unless you have a good
>reason to hide the super's behavior.
Corbin,
This comment caught by eye. As a general principle, I certainly agree
with your comment.
But I never call super when I override those methods, and I guess I
should be doing so. Does NSView's implementation do something or only
NSCollectionView?
The docs often comment about calling super. In NSView's case, they do
for beginDocument, beginPageInRect:atPlacement:, drawRect:, endDocument,
viewWillStartLiveResize, etc. but they don't for the
viewWillMoveToWindow:. I guess I'm so used to seeing a comment, that if
I don't see one, I don't call super. At least one Apple example also doesn't:
<http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/
EventOverview/MouseTrackingEvents/MouseTrackingEvents.html>
Should one call super for all the viewWill/Did methods?
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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:
This email sent to email@hidden