开发者

How to bind a NSMutableArray to NSArrayController's selection?

I have NSMutableArray (arr1), and NSArrayCont开发者_JAVA百科roller for that arr1.

I'd like to have another NSMutableArray's content to be the selection of the NSArrayController.


You can observe the array controller's selectedObjects informal property using KVO, and apply the changes to your own array.

There's no documented way to set that up any more automatically than that. I've had success setting up custom bindings without overriding the bind:::: method in views, but not in non-views, so I wouldn't consider that reliable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜