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: dhir...@mac.com
http://www.davehirsch.com
voice: (360) 389-3583
aim: dhir...@mac.com
vCard: http://almandine.geol.wwu.edu/~dave/personal/DaveHirsch.vcf
============================



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to