Looks good. Just needs some small tweaks to help debugging in the future. I was thinking perhaps some debug output statements can be added so that a user can report the terminal output incase something is going wrong. For instance, in the saveSunTimes (date, sunRise, sunSet) function, can you add an output statement like,
Utils.log("Saving Sunrise/Sunset times to disk");
This way we can be sure that it was saved.
Also in the else case below, can you add an output statement "Retrieving sunrise/sunset times from disk".
Looks good. Just needs some small tweaks to help debugging in the future. I was thinking perhaps some debug output statements can be added so that a user can report the terminal output incase something is going wrong. For instance, in the saveSunTimes (date, sunRise, sunSet) function, can you add an output statement like,
Utils.log("Saving Sunrise/Sunset times to disk");
This way we can be sure that it was saved.
Also in the else case below, can you add an output statement "Retrieving sunrise/sunset times from disk".
88 + else if (status == XmlListModel.Ready) { l.text = savedData[0][2]; .text = savedData[0][3];
89 + sunriseTimeLabe
90 + sunsetTimeLabel
91 }
In line 22, can you replace "Default Ubuntu Touch Clock" with "Sunrise and Sunset Database"
22 + db = LocalStorage. openDatabaseSyn c("ubuntu- clock-app" , "0.1", "Default Ubuntu touch clock", 1000);
In line 33, can you change that to "Error creating table in Sunrise/Sunset database".
33 + Utils.error("Error creating table in db: " + err);