views:

20

answers:

1

Hello.

I have next question:

I create own Controller ( myController:NSObjectController ) and it has own attributes, for example NSString* title;

Now I want to bind this attribute to some text field. Can I made that attribute 'title' display in 'Controller Key' menu of inspector binding window in IB; (There where 'selection', 'canADD' and else)

Dont worry about access to this attribute, I want just add it in to list

A: 

Hi,

I think what you want to do is to:

  • drag an NSObjectController from the Library palette
  • connect its "content" outlet to the instance of your NSObject
  • add "title" to the NSObjectController's list of "Keys"
  • then use the "title" attribute of your NSObjectController in your text field bindings

I hope this helps.

Best regards,

Frank

Frank R.
Yes it is, the question is How add title" to the NSObjectController's list of "Keys" ?
Select the NSObjectController object in IB, switch to the "Attributes" tab (Command-1), click on the "+" symbol at the bottom of the "Key" list and edit the new key to "title".
Frank R.