Re: Animated split view collapsing
Re: Animated split view collapsing
- Subject: Re: Animated split view collapsing
- From: Paul Kim <email@hidden>
- Date: Fri, 5 May 2006 18:11:10 -0400
You need to do the display in the -splitViewDidResizeSubviews: method
(which is called after resizing). Looks like -
splitView:resizeSubviewsWithOldSize: gets called indirectly by the
display mechanism.
Hope this helps.
paul
1. Here's the stack trace starting from near the bottom:
================================================================
#23862 0x000b58d8 in -[LS
MainWindowController splitView:resizeSubviewsWithOldSize:] at LS
MainWindowController.m:359
#23863 0x9382be4c in -[NSSplitView resizeSubviewsWithOldSize:]
#23864 0x93835f78 in -[NSSplitView
_regionForOpaqueDescendants:forMove:]
#23865 0x93766584 in -[NSView _regionForOpaqueDescendants:forMove:]
#23866 0x93835fa4 in -[NSSplitView
_regionForOpaqueDescendants:forMove:]
#23867 0x93766584 in -[NSView _regionForOpaqueDescendants:forMove:]
#23868 0x93766584 in -[NSView _regionForOpaqueDescendants:forMove:]
#23869 0x93785ac4 in -[NSThemeFrame
_regionForOpaqueDescendants:forMove:]
#23870 0x93765770 in -[NSView _drawRect:clip:]
#23871 0x93764c1c in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:]
#23872 0x93785664 in -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:]
#23873 0x9375e674 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#23874 0x93753968 in -[NSView displayIfNeeded]
#23875 0x000b58d8 in -[LSMainWindowController
splitView:resizeSubviewsWithOldSize:] at LSMainWindowController.m:359
#23876 0x9382be4c in -[NSSplitView resizeSubviewsWithOldSize:]
#23877 0x93835f78 in -[NSSplitView
_regionForOpaqueDescendants:forMove:]
#23878 0x93766584 in -[NSView _regionForOpaqueDescendants:forMove:]
#23879 0x93835fa4 in -[NSSplitView
_regionForOpaqueDescendants:forMove:]
#23880 0x93766584 in -[NSView _regionForOpaqueDescendants:forMove:]
#23881 0x93766584 in -[NSView _regionForOpaqueDescendants:forMove:]
#23882 0x93785ac4 in -[NSThemeFrame
_regionForOpaqueDescendants:forMove:]
#23883 0x93765770 in -[NSView _drawRect:clip:]
#23884 0x93764c1c in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:]
#23885 0x93785664 in -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisib
leRectForView:topView:]
#23886 0x9375e674 in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
#23887 0x93753968 in -[NSView displayIfNeeded]
#23888 0x937d9678 in UpdateViewAnimationViews
#23889 0x907dc82c in CFDictionaryApplyFunction
#23890 0x937d92d0 in -[NSViewAnimation setCurrentProgress:]
#23891 0x937d920c in -[NSAnimation(NSInternal) _advanceTime]
#23892 0x92978f5c in __NSFireTimer
#23893 0x907f7aec in __CFRunLoopDoTimer
#23894 0x907e4464 in __CFRunLoopRun
#23895 0x907e3a18 in CFRunLoopRunSpecific
#23896 0x92985164 in -[NSRunLoop runMode:beforeDate:]
#23897 0x000f4844 in -[MySplitView setSplitterPosition:animate:] at
MySplitView.m:131
#23898 0x000b5364 in -[LSMainWindowController toggleInfoView:] at
LSMainWindowController.m:307
================================================================
Beyond this, it starts repeating (repeats #23862-#23874).
2. LSMainWindowController.m:359 is the [sender display] call:
- (void)splitView:(MySplitView *)sender
resizeSubviewsWithOldSize:(NSSize)oldSize {
// Don't interfere with animation.
if ([sender isSplitterAnimating]) {
[sender display]; // LSMainWindowController.m:359
return;
}
// ...
}
3. I used some NSLogs to verify that -isSplitterAnimating is returning
the correct value.
4. I'm not overriding any of the NSSplitView draw methods.
5. The app exits with status -1 and then starts loading ~23,000 stack
frames. My initial Googling didn't tell me whether status -1 is a
stack overflow or something more useful.
I stared at the stack trace and and my code, and I don't see what's
causing the -splitView:resizeSubviewsWithOldSize: delegate method to
get called repeatedly. Any suggestions anyone can offer would be
great.
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden