On Mar 3, 2011, at 10:24 PM, Ulf Dunkel wrote: > In a tiny document-based Cocoa app for Snow Leopard, I have a document window > with two NSTableView objects, which get properly feeded by > NSTableViewDataSource according to the documentation. Both table views show > simple arrays of one column each. > > I can fill both table views with random content as I like to and even drag > and drop inside a list, with perfect refresh of the relevant table view. But > I would like to sync both table views somehow. > > Here are my two questions: > > 1) Which delegate can I use to inform table view B to update and reload its > data when I have dragged an item inside table view A? > > The NSTableViewDelegate methods don't seem to really help me here; I tried > them all. > > I could of course add any "Refresh" button or stuff, but I would like to > refresh NSTableView B as soon as a row item of NSTableView A has been > successfully dragged into a new position.
If you’re adding it to the object array, you can easily do the update notification then. > > 2) How can I prevent drag operations from table view A to table view B (and > vice versa)? List members shall only be dragged inside their own list. You can pass NSDragOperationNone if the target is the originating table. _______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com