Hi,

I recently began exploring NSTreeController, but I'm experiencing problems with its moveNode:toIndexPath:. It's new to Leopard, but seems to be consistently moving nodes to incorrect indexes. There's a previous list post about exactly this, but without replies. http://lists.apple.com/archives/cocoa-dev/2008/Sep/msg01635.html

The same thing happens with Apple's own sample code, SourceView! (http://developer.apple.com/samplecode/SourceView ) -[BaseNode setChildren:] gets called twice for every time you move something in the sidebar, once for removing the item from its previous location, once for inserting it in the new location. When inserting, the new item is always inserted _last_ among its siblings, no matter what index you dropped it on. Items are correctly ordered in the OutlineView itself, but the underlying model is incorrect, and thus out of sync.

Is moveNode:toIndexPath: completely broken?

Thanks,

Tomas Franzén
Lighthead Software
http://www.lightheadsw.com/

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to