Quote:
Originally Posted by Mark Nord
1) parseBoolean() could be replaced with values[1] == 'true'
|
Hi Mark,
That got it. Here's the relevant part of my code:
Code:
// This is not necessary. A simple result = (param == 'true') would do
//var parseBoolean = prsp.compile("param", "return Core.system.rootObj.__xs__boolean.parse(param)");
// reads values of target.settings.xx form file
target.loadSettings = function (){
var stream, inpLine;
var values = [];
try {
if (FileSystem.getFileInfo(datPath)) {
stream = new Stream.File(datPath);
while (stream.bytesAvailable) {
inpLine = stream.readLine();
values = inpLine.split(':');
if (values[1] == 'true') {
target.settings[values[0]] = true;
} else if (values[1] == 'false') {
target.settings[values[0]] = false;
} else {
target.settings[values[0]]=values[1];
}
// target.bubble('tracelog',target.settings[values[0]]);
}
stream.close();
}
} catch (e) {}
// target.bubble('tracelog',_Core.debug.dumpToString(target.settings,' ',1)); // debug
}
Quote:
Originally Posted by Mark Nord
PS: there is a report of extensive battery drain afte using Sudoku with a PRS-600 on the PRS+ issues-page. Do you observe a similar behaviour? With Sudoku and/or Minesweeper? As this are the only games utilizing the FSK-Menus.
|
Unfortunately, since I don't like Sudoku, I have not noticed a problem since I have not used it for any length of time. Sorry! Similarly, I have not used MineSweeper for any extended length of time - mainly just testing!
Sincerely,
Ben.