• 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
Get Value from NSArrayController Binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get Value from NSArrayController Binding


  • Subject: Get Value from NSArrayController Binding
  • From: Christian Isaacs <email@hidden>
  • Date: Mon, 2 Jun 2008 12:08:31 -0400

Hello Everyone!
I currently have an AppContoller with a method named events that returns an NSArray. This NSArray contains a collection of events returned by the CalCalendarStore eventsWithPredicate method. In IB I have an NSArrayController named Events that is bound to my AppController events NSArray. I also have an NSTableView with one column and it's value is bound to Events.arrangedObjects.title. Everything works perfectly!


However, I then sub-classed NSCell to do some custom drawing of the cell and would like to put the title of an event in the cell. I am using the following code to populate the the NSTableView with my custom cells:

EventCell *customEventCell = [[[EventCell alloc] initWithEventAttributes:*TITLE VALUE GOES HERE* eventStartTime:calItemStartDate eventEndTime:calItemEndDate] autorelease];
[[eventTableView tableColumnWithIdentifier:@"events"] setDataCell:customEventCell];


So here's my question:

1) How do I get the title value from my Events NSArrayController Object? I've tried [eventTableView valueForKey:@"Events.arrangedObjects.title"] and different variations of it.


Thanks, Christian

www.sippingbits.com

_______________________________________________

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: Get Value from NSArrayController Binding
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: ANN: “Cocoa Design Patterns” content available via the Safari Rough Cuts
  • Next by Date: many-to-many relationships and retain cycles
  • Previous by thread: ANN: “Cocoa Design Patterns” content available via the Safari Rough Cuts
  • Next by thread: Re: Get Value from NSArrayController Binding
  • Index(es):
    • Date
    • Thread