View Single Post
Old 03-24-2011, 11:36 AM   #233
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 TJ27 View Post
I can not normally run freecell last
version (with the text help) in the prs + 2.10 kartu. In fsk
simulator everything is fine. I do not understand what to edit
in js, or xml files. Runs as a version for the 505 (although
I have 350) and the help page blank.
This might be a problem with the starter-file FreeCell.js in the addons-folder.
(Note: if the error occurs before
Code:
kbook.autoRunRoot.sandbox.hasNumericButtons = Core.config.compat.hasNumericButtons;
is set, the flag to decide which model is used, will not be set.
Furthermore getFileContent - function isn't handed over, and so the help-text isn't loaded.)

The starter-files like "FreeCell.js" in the addons-folder aren't used by the Sim, and can contain erroneous code.
JS-execution is stopped immediately at the first error, if not trapped by a try/catch statement.

Try to use this simplified starter-code:
Spoiler:
Code:
tmp = function() {
	var FreeCell = {
		name: "FreeCell",
		title: "FreeCell",		
		icon: "GAME",			
		activate: function () {
			kbook.autoRunRoot.sandbox._icon = Core.config.compat.NodeKinds.getIcon("GAME",0);
			kbook.autoRunRoot.sandbox._title = FreeCell.title;
			kbook.autoRunRoot.sandbox.getSoValue = Core.system.getSoValue;
			kbook.autoRunRoot.sandbox.hasNumericButtons = Core.config.compat.hasNumericButtons;
			kbook.autoRunRoot.sandbox.getFileContent = Core.io.getFileContent;
			kbook.autoRunRoot.path = Core.config.addonsPath + "FreeCell/freecell.xml";
			kbook.autoRunRoot.enterIf(kbook.model);
		},
		actions: [{
			name: "FreeCell",
			group: "Games",
			icon: "CARDS",
			action: function () {
				FreeCell.activate();
			}
		}]
	};
	
	Core.addAddon(FreeCell);
};
try {
	tmp();
} catch (e) {
	// Core's log
	log.error("in FreeCell.js", e);
}

HTH
Mark
Mark Nord is offline   Reply With Quote