Hi,

I'm really very close to having a working NSSplitView with animated "collapse" 
& "uncollapse" of the subviews, but there still is a problem when one of the 
subviews is first collapsed by dragging the divider over the subview's minimal 
size as controlled by the delegate.

When I expand such a collapsed subview, the behavior I'm seeing is really 
unpredictable. The subview will be expanded and redrawn just fine for 10 or 20 
consecutive times or so, but then all of a sudden the expand will fail. There 
*seems* to be a pattern that after the app is started, it either works fine, or 
it fails. When it works, it usually stays like that. But after a restart of the 
app, there's really no way I could predict the behavior.

When it fails, it seems as if the autoresize mechanism in the expand view is 
not working correctly, and its subview extends beyond one side of the expanded 
view. After that, there's no way the layout 'restores' itself back to normal. 
When I close the app and restart, everything works fine again, or not…

Because this is so unpredictable, I haven't been able to find the cause of the 
problem, and I'm hoping someone here has a suggestion on how to solve this 
problem. Maybe there's a problem with timing or synchronization, but I wouldn't 
know how to find out if there was. Maybe, I should somehow disable the layout 
mechanism during animation, and I've tried something in this area already, but 
so far without success. So, any suggestions would really be appreciated.

As for my implementation: in general, prior to the animation, I'm disabling the 
split view delegate and the autoresizing of its subviews. I'm setting the 
target frames for both views, and then use the animator proxies. Afterwards, 
I'm restoring the delegate and the autoresizing behaviour back to their 
original values. Again, this all works if the subviews were not first collapsed 
by dragging the divider. 

-- 
Luc Van Bogaert.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to