• 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
Binding to an NSMutableArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding to an NSMutableArray


  • Subject: Binding to an NSMutableArray
  • From: Lorenzo Thurman <email@hidden>
  • Date: Tue, 15 Feb 2011 22:37:52 -0600

I have an object, Student, that contains firstName and lastName as instance
variables. Student also contains an NSMutableArray of infraction objects
that contains NSString's for the infraction name, location, punishment and
an NSDate. I want to bind these infraction objects to the columns of an
NSTableView. What I've done to make this work is copy the infraction object
to another NSArray when the Student is loaded and binding the table columns
to the NSArrayController associated with this new array. Obviously, this is
suboptimal. It seems to me that I should be able to bind directly to the
infraction as it resides in the Student object, but I just can figure out
how to bind to a particular index within the NSMutableArray within the
Student object. I've looked at some examples here:
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

but I didn't find anything quite like what I'm doing. I've gone back through
the KVC/KVO documents to see if I'm missing something. Does anyone have any
pointers on how I can go about this? If its possible at all.
TIA
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Binding to an NSMutableArray
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: Key equivalents for non-menu items
  • Next by Date: Re: Processing mouse clicks using Quartz events
  • Previous by thread: Re: Processing mouse clicks using Quartz events
  • Next by thread: Re: Binding to an NSMutableArray
  • Index(es):
    • Date
    • Thread