Automatically updating view inside NSScrollView
Automatically updating view inside NSScrollView
- Subject: Automatically updating view inside NSScrollView
- From: "Kyle Sluder" <email@hidden>
- Date: Mon, 18 Feb 2008 16:31:16 -0500
Hello list,
I've got a view inside an NSScrollView which needs to be constantly
updated. It's similar in concept to a timeline view in an app such as
Pro Tools or GarageBand, but represents a stream of events with "now"
at the leftmost point, and one hour in the future at the rightmost
point. The view must always maintain a one-hour window starting from
now (unless there's a drag or menu operation going on).
So I set up a timer in the default runloop mode to call [self
setNeedsDisplay:YES] every second, forcing a redraw of my event
stream. This would work great, except that NSClipView is making my
life difficult. The app doesn't appear to actually do anything, but
if you scroll the view and then scroll back, it has updated
appropriately. For the life of me, I can't figure out how to tell the
clip view that the document view underneath it has changed. Any
assistance would be appreciated.
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