NSTreeController without Core Data, simplest way to drag reorder?
I have a class Field
. Each instance contains an NSMutableArray of subfields
, which are more Field objects.
For my UI, I'm using an NSTreeController and an NSOutlineView.
I'd like to be able to reorder and move the fields around by dragging. I'm not sure of the simplest way to do this. Most of the tutorials on the net seem to focus on Core Data, which is intrinsically unordered and thus requires more trickery to get to work. My model is based on arrays, which are ordered.
Most of the tutorials I can find were written in the Tiger era, where the 开发者_运维百科prevailing wisdom ended up being "Don't use NSTreeController yet, it's buggy", or else they're focussed on Core Data.
精彩评论