NSMutableArray add data to NSTableView creating an empty row?

34 Views Asked by At

I've create a function below which will call when a button is pressed:

- (IBAction)setData:(id)sender{
    
    [_myArrayController addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:
                            @"James", @"Name",
                            @"Smith",@"Surname", nil]];

}

On My NSTableView I have two columns both NSTableViewColumns have been binded to the keys above Name for the first and Surname for the second for the arrangedObjects controller key.

When I press the button a new row is created however both column fields are blank rather than saying James Smith.

Any ideas what I could be doing wrong?

0

There are 0 best solutions below