Re: NSView-based NSTableView: How to animate when using bindings?
Re: NSView-based NSTableView: How to animate when using bindings?
- Subject: Re: NSView-based NSTableView: How to animate when using bindings?
- From: Corbin Dunn <email@hidden>
- Date: Fri, 29 Jul 2011 15:25:45 -0700
On Jul 29, 2011, at 10:07 AM, Daniel Vollmer wrote:
> Helloes,
>
> I'm experimenting with migrating from my formerly NSCollectionView-based drawing to using an NSView-based table-view (as the tableView is conceptually closer to what I'm displaying (http://www.maven.de/code/wowplot/example_chains.png).
>
> The NSCollectionView had really nice animation behaviour for inserting and removing items and well as changing the minimum item size (which I used to force the collectionView to expand into its scrollView and thus "zoom" into my content).
> I'm not sure how to replicated these animations in an NSTableView when populating it with bindings, as I cannot call both [arrayController insertObject:] as well as [tableView insertRowsAtIndexes:withAnimation:].
>
> Is combining the animation properties of an NSView-based NSTableView possible when using it via Cocoa bindings?
Unfortunately there is no automatic support for this yet.
You'd have to provide the content yourself for the table (instead of using the content binding, but you can still use bindings for the NSTableCellViews and subviews of them), and watch for array controller changes and then transform them into inserts/deletes/moves on the tableview.
-corbin
_______________________________________________
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