Is there a key path for this?
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