开发者

NSTreeController without Core Data, simplest way to drag reorder?

开发者 https://www.devze.com 2023-02-13 07:20 出处:网络
I have a class Field. Each instance contains an NSMutableArray of subfields, which are more Field objects.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消