Hi Christian, first of all, this looks like a real bug! Thanks for reporting it. Could you please supply some example data so that I can reproduce it? But im surprised that it worked anyway because that feature of using a property chain for the target is not even documented. ;) So you found one of those features im not really happy with at the current state.
But I guess thats not the real problem. I can see that you try to keep two arrays in sync. The question is why? Why do you need to have two arrays and not only one? You could easily copy the reference and don't care about keeping the arrays in sync. :) Just as a reminder if you want to keep that code like it is, you need to listen to the changeLength events of both arrays to keep the length of them in sync. Best, Martin Am 19.06.2009 um 00:09 schrieb panyasan: > > Hi, this is a question for Martin. > > Assume you have an object with a property "model" which contains an > object > created by the json Marshaller, which contains a property "values" > containing an qx.data.Array with values. Shouldn't > the following should be possible, given that "this" is the object, and > "index" an integer value: > > targetObject.bind( targetPath, this, "model.values[" + index + "]" ); > this.bind( "model.values[" + index + "]", targetObject, targetPath ); > > What this is supposed to do is to bind values in the qx.data.Array > to the > target path on the target object, and vice versa. > > The problem I have is that I get this error: > > TypeError: target["reset" + qx.lang.String.firstUp(lastProperty)] is > not a > function > > When I trap the error with a try/catch in > qx.data.SingleValueBinding, line > 356seqq, I can see that it tries to call "target.resetValues[2]", > which of > course makes no sense. If I suppress the error, everything works as > expected, so the problem is only with the "reset" stuff. > > Am I doing something wrong, or is this a bug? Since I have seen > quite a > number of messages on the list that talk about the "target["reset" + > qx.lang.String.firstUp(lastProperty)] is not a function" error, I > wonder if > you couldn't put some more error trapping into the function, so that > more > useful information is given to the user. > > Thanks, > > Christian > > > -- > View this message in context: > http://www.nabble.com/Databinding%3A-TypeError%3A-target-%22reset%22-%2B-qx.lang.String.firstUp%28lastProperty%29--is-not-a-function-tp24099676p24099676.html > Sent from the qooxdoo-devel mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
