NSArrayController does not work with NSMutableDictionary for NSTableView

I am trying to display content in an NSTableView using NSMutableArrayController NSMutableDictionary entries.

I have completed the following steps:

  • In the application delegation class, I created an NSMutableArray object named "geniuses" and saved some NSMutableDictionary objects with the keys: "geniusName" and "domain".

  • I took the NSArrayController object in IB, linked its contents to the application delegation class, and set its path to the keywords for the genes. In the Attribute Inspector area, set the mode as a class and the class name as NSMutableDictionary. added keys: 'geniusName' and 'domain'.

  • In IB, I took a table view object. Associated its content with the array with the array controller, the path of the controller key is defined as organized objects. The property of the bound value of its first column to the array controller, the controller key path is specified as ordered objects, the model key path is specified as 'geniusName'. Property of the bound value of its second column for the array controller, the key path of the controller is specified as ordered objects, the key path of the model is specified as "geniusName".

After completing these steps, when I tried to create and run the project, I found an unfilled table view.

Can someone suggest me where I can be wrong?

Thank,

Miraaj

+3
2

. genuises? , KVO.

+1

, , :

NSMutableArray *myObjects;

?

- . , , init initWithCoder:.

- , . , nil, - nil, .

+1

Source: https://habr.com/ru/post/1744957/


All Articles