NSArrayController not working with NSMutableDictionary for NSTableView
Posted
by Miraaj
on Stack Overflow
See other posts from Stack Overflow
or by Miraaj
Published on 2010-05-11T15:14:34Z
Indexed on
2010/05/11
16:44 UTC
Read the original article
Hit count: 327
Hi all,
I am trying to display content in NSTableView using NSMutableArrayController of NSMutableDictionary records.
I followed steps written below:
In application delegate class, I created an NSMutableArray object with name 'geniuses' and stored some NSMutableDictionary objects with keys: 'geniusName' and 'domain'.
I took an NSArrayController object in IB, binded its controller content property to application delegate class, and set its model key path to 'geniuses'. In attribute inspector pane set mode as class and class name as NSMutableDictionary. Added keys: 'geniusName' and 'domain' to it.
In IB I took a table view object. Binded its content property to array controller, controller key path set as arranged objects. Binded value property of its first column to array controller, controller key path set as arranged objects, model key path set as 'geniusName'. Binded value property of its second column to array controller, controller key path set as arranged objects, model key path set as 'geniusName'.
After following these steps when I tried to build and run the project I found un-populated table view.
You can find my code here.
Can anyone suggest me where I may be wrong?
Thanks,
Miraaj
© Stack Overflow or respective owner