View Single Post
Old 05-31-2011, 09:41 AM   #363
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by BenChen View Post
Do you want me to push my changes for MineSweeper to the repository? These are the changes to make the game work on my 600. (If you recall, I was having trouble with the parseBoolean function.)
Ben

I've modified code in minesweeper.js to this:
Spoiler:
Code:
        // 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') || (values[1] == 'false')) {                                          
                                        target.settings[values[0]] = values[1] == 'true';
                                } else {
                                        target.settings[values[0]]=values[1];  
                                }
                        }
                }       
                stream.close();
                } catch (e) {}  
        }


This should work with your 600ed, too.
Again thanks for your notification.

If there was more, please push.

Regards
Mark
Mark Nord is offline   Reply With Quote