Hello,
I have an NSArrayController
whose content is the "servers
" property of my AppDelegate.
I have an NSTextField
which is bound to the "selection.name
" property of the NSArrayController
and I have buttons attached to the "add:
" and "remove:
" actions on the NSArrayController
.
What I'd like to see happen, is when I click the "Add" button, the NSTextField
becomes the first responder so that users can immediately edit the name of the server.
My current strategy is to observe the "arrangedObjects
" property of the NSArrayController
but all I get back from the NSKeyValueChangeKindKey
is the NSKeyValueChangeSetting
enum. I was hoping to get the NSKeyValueChangeInsertion
value so I could ask the text field to become the First Responder.
My question is, am I going about this the right way or is there a more common way to accomplish this? I'm doing fine hooking up bindings, I'm just struggling with how to insert my own behavior in the cracks.