开发者

How to set title of NSBox from an array controller via cocoa- bindings

开发者 https://www.devze.com 2023-01-09 00:50 出处:网络
I have an array controller holding some values, say - subjects. I am displaying these values in a table view. I want to set the title of NSBox as subject in selected row.

I have an array controller holding some values, say - subjects. I am displaying these values in a table view. I want to set the title of NSBox as subject in selected row.

I tried to do it in following way: Binding pane: Title, Controller K开发者_C百科ey: selection, Model Key Path: subject.

But it is always displaying nil as box title.

Can anyone suggest me how to do it correctly?

Thanks,

Miraaj


This sounds like the correct approach. Tried to reproduce and it worked. A NSArrayController, and a NSBox wich title is bound to the arrayController with controller key set to selection, and modelkey to name (or whatever). No problem

Are you sure you have choosen the right object to bind to?

Try to do the same with a text object, and bind the value

0

精彩评论

暂无评论...
验证码 换一张
取 消