• 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: firstResponder KVO snow leopard crash; bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: firstResponder KVO snow leopard crash; bug?
      • From: Corbin Dunn <email@hidden>
References: 
 >firstResponder KVO snow leopard crash; bug? (From: Aaron Clarke <email@hidden>)
 >Re: firstResponder KVO snow leopard crash; bug? (From: Corbin Dunn <email@hidden>)

  • Prev by Date: Re: Question about Style wrt "private" methods
  • Next by Date: Object with no roots not garbage collected
  • Previous by thread: Re: firstResponder KVO snow leopard crash; bug?
  • Next by thread: Re: firstResponder KVO snow leopard crash; bug?
  • Index(es):
    • Date
    • Thread