• 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
Is there a key path for this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is there a key path for this?


  • Subject: Is there a key path for this?
  • From: David Hirsch <email@hidden>
  • Date: Sat, 28 Nov 2009 14:45:55 -0800

I want to know if I can do this with bindings or not. I've read a good deal, and tried a few things without success.

My document class has an array of Instructors, with a controller. Each instructor has a timeConstraint, which in turn has an array of NSNumbers. I have an NSTableView bound to the Instructor array, and I would like to show the mondayCosts array of floats in another TableView, which will change when the selection in the instructor table changes. Below are bits of the headers. (I have @synthesized each of the properties in the implementation files)

I can get the selection, including other fields of the selected Instructor. I've tried making another NSArrayController in IB with its content bound to instructorController.selection.timeConstraint.mondayCosts, and binding the table column to that, but even if that works, then it's not clear to me how to get the floats out of the NSNumbers.

@interface ClassSchedulerDoc : NSDocument
{
	IBOutlet NSArrayController	*instructorController;
	NSMutableArray	*instructors;
}


@interface Instructor : NSObject <NSCoding> { } @property (retain) ProfTimeConstraint *timeConstraint;


@interface ProfTimeConstraint : Constraint {
}
@property (retain) NSMutableArray *mondayCosts; // floats within NSNumbers




============================
Dave Hirsch
Associate Professor
Department of Geology
Western Washington University
persistent email: email@hidden
http://www.davehirsch.com
voice: (360) 389-3583
aim: email@hidden
vCard: http://almandine.geol.wwu.edu/~dave/personal/DaveHirsch.vcf
============================



_______________________________________________

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: Is there a key path for this?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: When to use exception handling?
  • Next by Date: Re: dynamic NSPointArray allocation
  • Previous by thread: Re: When to use exception handling?
  • Next by thread: Re: Is there a key path for this?
  • Index(es):
    • Date
    • Thread