Hi,
After spending two days struggling with Dashcode, I have finally
created a dynamic JSON datasource from an internal sqlite table, to
populate an edge to edge list. All works well but, whenever I select a
row, the code results in the following exception:
SelectedObjects(0) [null] is not an object
This is the code within the rowclick event:
localStorage.setItem('selectedProject',
(selectedObjects[0].valueForKey("ProjectID")));
The datasource is quite straight forward.
[{ProjectID: "200", Project_Name: "Something",
Project_Description: "Something else}, ....]
The prepareRow: is as follows:
prepareRow: function(rowElement, rowIndex, templateElements) {
if (templateElements.text8) {
templateElements.text8.innerText =
this._rowData[rowIndex].ProjectID;
}......
And I have tried setting the value, key etc to text8 without luck...
Now it seems to me that this is a binding issue with the datasource
but I cannot work out what I need to do with the bindings to make it
happen. It works fine if there is a static .js file and I use the
dashcode bindings interface, but what I am missing something
programatically. Any clues?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en.