NSTableView and Bindings
NSTableView and Bindings
- Subject: NSTableView and Bindings
- From: David Gardener <email@hidden>
- Date: Tue, 22 Mar 2005 14:22:12 -0700
<x-tad-bigger>I'm currently working on an document based application using TableViews, NSArrayContoller and bindings. Some of the data in the column headings are the result of using an operand to get the result. ( eg. column1 = statically typed =3, column2 = staticaly typed = 2, and computed column3 is the result of method: -(double)column3{return (double)(column1 + column2) which returns 5 (the sum of the two values). I have the setter and getter methods for the statically typed table entry values and have default methods set in the init methods. I also have the [ column setKeys:[NSArray arrayWithObject:@"@column1",@"column2",]triggerChangeForDependentKey:@"@column3']; init methods, outlined in the Currncy Converter tutorial, to set the value for column3. In the bindings info window for each column header the header is bound to: NSArrayController, controller key :arranged objects, and Model Key Path:Column1,2or3. Basic stuff and everything works fine up to this point. When I go to use the result for column 3 for the next calculation for another column, it won't work. I'm not sure if the result in column3 is a read only value and if it is, how do you get it into a usable number??? I'm also using another window, through KVO, who's textFields are bound to the Tableview values, to enter values to the tableView and it also add new rows. The second problem is that the table won't update the programmed values until another blank row is added to the table. If I type the values directly into the table and hit enter the programed values update. I've set continuous update and validate in the bindings window but it still won't work.I tried adding another action button (preserveSelection), a method in NSArraycontroller, but it woudn't connect. How do you get the programmed values to produce reusable numbers and update from entering data from another window???? DSG Thanks for any help!!!!
</x-tad-bigger> _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden