• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa Bindings, NSMatrix, setting programmatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa Bindings, NSMatrix, setting programmatically


  • Subject: Cocoa Bindings, NSMatrix, setting programmatically
  • From: Renaud Boisjoly <email@hidden>
  • Date: Tue, 27 Apr 2004 22:27:32 -0400

Hi all!

I have an NSMatric bound to an array of strings. The values of the NSButtonCells are entered directly in Interface Builder.

Everything works, the Bindings keep the selection in the NSMatrix. My issue is to set a value for the selection programmatically.

For example. My class is called "RBThings" which has a property called "weekdays" (NSMutableArray) and the table which contains the weekday names is bound to this using an NSArrayController. But I wish to set the value in the weekdays of this object initially in its init method (or elsewhere if there is a better way).

I have a feeling that what is stored for the binding is the actual object (NSCell?) in the Matrix which is selected. What I collect in the array seems to be the string though... but if I programmatically set the value of the weekdays property to "Monday", the interface doesn't reflect this.

What is the proper way to set the value of a bound property programmatically?

I hope my description is clear enough...

thanks for any help!

- Renaud
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Cocoa Bindings, NSMatrix, setting programmatically
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Thread Question
  • Next by Date: Re: NSStreamEventHasBytesAvailable not getting thrown
  • Previous by thread: Re: Problems with XCode 1.2
  • Next by thread: Re: Cocoa Bindings, NSMatrix, setting programmatically
  • Index(es):
    • Date
    • Thread