• 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
-enclosingScrollView returns nil when receiver is a descendant of the clip view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-enclosingScrollView returns nil when receiver is a descendant of the clip view


  • Subject: -enclosingScrollView returns nil when receiver is a descendant of the clip view
  • From: Kyle Sluder <email@hidden>
  • Date: Wed, 23 Jun 2010 11:50:00 -0700

Hi list,

We recently noticed that -enclosingScrollView will only return an
ancestor scroll view if the receiver is a descendant of the scroll
view's document view. This is a problem for us, since we put our field
editors and other accessory views in a subview of the scroll view's
clip view that isn't the document view, because the document view is a
custom layer-hosting view.

To describe it a bit more visually, here's a diagram of our view hierarchy:

Scroll View
|- Clip View
  |- Accessory view
  |- Document view

Calling -enclosingScrollView on the accessory view returns nil. I
believe that it should return the scroll view.

One of the workarounds we're mulling over is to replace NSView's
implementation of -enclosingScrollView to return the scroll view if
the receiver is a descendant of the clip view. This makes sense to me,
because I can't see a situation in which one would call
-enclosingScrollView without the intent of obtaining "the scroll view
that is responsible for scrolling me around." But since we don't have
the source to AppKit, we can't be sure that AppKit doesn't rely on
this behavior.

I've submitted rdar://problem/8119868 to this effect, but I was
wondering if anyone had any additional comments.

Thanks,
--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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: -enclosingScrollView returns nil when receiver is a descendant of the clip view
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: changes to NSView's frame in its window
  • Next by Date: Re: iOS4: UDP sockets in the background
  • Previous by thread: Re: changes to NSView's frame in its window
  • Next by thread: Re: -enclosingScrollView returns nil when receiver is a descendant of the clip view
  • Index(es):
    • Date
    • Thread