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.
精彩评论