Tuesday, 27 August 2013

How to bindi the NSMutableArray to ArrayController through xib

How to bindi the NSMutableArray to ArrayController through xib

I am new to Cocoa . I am displaying a simple Tableview populated with
NSMutableArray which is bound to the NSArrayController as follows
[_arrController bind:@"contentArray" toObject:self
withKeyPath:@"dataArray" options:nil];
Here _arrController is the IBoutlet to my NSArrayController and dataArray
is my NSmutableArray with the data.
I am successful in populating the Tableview when I do the binding
programatically. However I am not able to achieve the same binding through
the Interface Builder.
I selected ArrayController in my IB , went to binding section,and tried
binding under the controller section by selecting the model key path as
dataArray.But however , my table is not populated with data , where as
programatically I can achieve my task easily. Any help is appreciated.

No comments:

Post a Comment