I know this is an easy one, but I just thought I could spare myself some (more) time searching through the documentation.
Usually, when I have an "Add" and a "Remove" button, along with an NSArrayController
, I simply have to click-drag from each button and connect them to the add:
and remove:
actions of the NSArrayController
.
Now, I'm trying to do the very same thing, programmatically with NSArrayController
(co
) :
[addButton setAction:@selector(add:)];
[addButton setTarget:co];
What am I doing wrong?
The rest of the NSArrayController
operations, handling an NSMutableArray
of dictionaries, etc works fine.