Re: NSTableView and Bindings
Re: NSTableView and Bindings
- Subject: Re: NSTableView and Bindings
- From: Steven Kramer <email@hidden>
- Date: Thu, 24 Mar 2005 14:22:50 +0100
Op 23-mrt-05 om 20:25 heeft David Gardener het volgende geschreven:
My apology for misleading, the additional @ was spurious. Should read
[Columns setKeys:[NSArray arrayWithObjects: @"column1,@"column2", nil]
triggerChangeNotificationForDependentKey: @"column3"];
This init method sets the array for changes in column1 and column2's
values and responds with a result for column3. -right?
method is: -(double)column3{ return (double)(column1 + column2);}
This works as it should. When I go to use the value of column3 or
@sum.column3, in the next calculation eg:
[Columns setkeys; [[NSArray
arrayWithObjects:@"column1",@"column3"(or @"@sum.column3"-not actual
code),nil]
triggerChangeNotificationForDependentKey: @"column4"];
with method: -(double)column4{ return (double)(column1 + column3);}
It won't work, I think because the value of Column 3, or if I use
@sum,column3, is a read only value. All these are number values.
Could you post some actual code? For instance, in this sample, you
treat 'column3' as an instance variable, not a method like below. Is
that actual code?
-(double)column4{ return column1 + [self column3]; }
I'm also using another window to add,delete, & insert rows and add the
value information into the tableView though KVC, KVO and Bindings.
This window does some other calculations of values that are entered
into the TableView. The table won't update the calculated values until
I add or delete a row. Question is: how do I get the calculated values
into a usable format and also get the table to reload the values
without having to add or delete a row from the second window??? Thanks
again!!!
Try [yourArrayController rearrangeObjects] and be sure to read the
documentation on that method.
Regards,
Steven Kramer
--
email@hidden
http://sprintteam.com/
_______________________________________________
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