开发者

Bind value to nth object of array

I have an NSView and an NSArrayController and I'd like to bind some values inside tha开发者_运维知识库t view to an object in the array controller's arrangedObjects array. How would I do this? I thought about creating a property like "currentObject" and bind everything to that. But this seems ugly to me..

(I only have one view for all the objects but the user should be able to click on next and backward.)


What are you really trying to accomplish? Normally a "detail view" is bound to the array controller's selection, not an object at a given index. If you'll always be wired to the same object, just use an NSObjectController, set its content object to the desired one and bind your view to it instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜