Re: Animated split view collapsing
Re: Animated split view collapsing
- Subject: Re: Animated split view collapsing
- From: "Lawrence Sanbourne" <email@hidden>
- Date: Mon, 24 Apr 2006 23:42:29 -0500
On 4/24/06, Greg Herlihy <email@hidden> wrote:
> There are two problems with the original animating split view code. First,
> the original routine did not check the orientation of the split view to
> determine whether it is the width or the height of the target view that
> should be adjusted. Second, the distance that the divider has to move in
> order to completely cover the target frame is clearly dependent on the
> view's current size - and could not be represented as a hard-coded constant.
> And the actual disntance to move the divider has to be slightly less than
> the view's current dimension, because reducing the width or height of the
> target's view to a zero seems to make it disappear permanently.
Great! These are all great changes, of course. (I assumed I'd work out
the problem with the splitter movement distance once I got it moving
at all.)
> The overall result once the NSAnimation is working is quite smooth (a
> revised implementation is below).
This is really strange. I'm still getting the same exception repeated
many times:
*** NSTimer discarding exception '*** -[NSCFArray objectAtIndex:]:
index (1) beyond bounds (0)' that raised during firing of timer with
target 3d0670 and selector '_advanceTime'
So, the new code isn't working for me either. There must be something weird
> In contast, I found RBSplitView's
> animation (which does not use an NSAnimationView) to be jerkier and suffer
> from "tearing" when I last tried it out.
In addition, RBSplitView continues drawing the divider when the pane
is collapsed.
> Finally, to make the divider disappear when a pane is collapsed, simply
> override drawDividerInRect: and have it call its super only when none of its
> subview's dimensions are close to zero.
This should work really well.
In hopes of solving the exceptions, I'm soon going to try a completely
new approach. In the meantime, if you have any suggestions on finding
the cause of the exceptions, I'd love to hear them.
Thanks for the help!
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