Re: NSTableView and Bindings
Re: NSTableView and Bindings
- Subject: Re: NSTableView and Bindings
- From: Steven Kramer <email@hidden>
- Date: Wed, 23 Mar 2005 09:27:48 +0100
Op 22-mrt-05 om 22:22 heeft David Gardener het volgende geschreven:
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.
If you are quoting actual code: you have spurious '@' symbols inside
your strings.
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???
And here's where I lost track. What do you mean by this? What value are
you trying to use, and how, and for what purpose?
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!!!!
This will probably be solved when you solve the first problem.
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