• 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: Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete?


  • Subject: Re: Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete?
  • From: "Kyle Sluder" <email@hidden>
  • Date: Wed, 16 Jan 2008 17:47:00 -0500

On 1/16/08, Luke Evans <email@hidden> wrote:
> 2. When would be a better time to ask call the new NSView's
> scrollRectToVisible:?  Presumably, there should be a 'good moment'
> known to this object itself somehow (i.e. receipt of some message to
> say that all the resizing effects up the hierarchy are completed and
> its safe to ask for scrolling operations).  Clearly, if I have to call
> into the view hierarchy from 'outside' (i.e. just after the call that
> adds the new item to my model), then I'm going to have to set up some
> way to get a model item's view object, and this would seem to violate
> the nice encapsulation/separation of view an model.

If I'm not mistaken, NSScrollView (or NSClipView) registers for the
document view's NSViewFrameDidChangeNotification, which is going to
happen in the next run through the runloop after your view gets added
to the NSCollectionView.  Perhaps you should have a controller of some
sort register for this notification from the collection view as well
and have that object scroll the scroll view by calling
-[NSCollectionView scrollRectToVisible:].

HTH,
--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: Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete?
      • From: Luke Evans <email@hidden>
References: 
 >Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete? (From: Luke Evans <email@hidden>)

  • Prev by Date: Re: NSWindow: Custom title bar double-click action?
  • Next by Date: Re: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling
  • Previous by thread: Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete?
  • Next by thread: Re: Scroll view clip view not moving to new object inserted in contained NSCollectionView - when are resizing events in the view hierarchy complete?
  • Index(es):
    • Date
    • Thread