Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2011, 01:47 PM   #541
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by kartu View Post
Hi Ben,

the reported problem is, that capturing is not mandatory.

PS
Wanted to raise issue of not being able to capture backwards, but I guess it's ok according to English Draughts rules.
Hi everyone,

Just wanted to say that I have added one setting to Draughts. You now have the option of allowing pawns to capture backwards or not. (I should note that I have not changed the AI so the reader will never capture backwards.)

I am afraid that mandatory capturing ("if you can jump you have to jump") is beyond me. The way that things have been programmed, I don't think it will be possible without a major code re-write. But if anyone else wants to step in and have a go...

The update has been pushed to both repositories (default and apps).

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 09-19-2011, 02:19 PM   #542
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: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Hello Ben,

as a matter of fact Core.lang.getLocalizer is available in the sim.
Calling getLocalizer: function (category, strings) with a set of localized strings should be possible.
If the resource-strings will be included in lang.ods then there might be a problem with passing the params to the "sandboxed" JS-code of calendar.
Kind regards
Mark
Mark Nord is offline   Reply With Quote
Advert
Old 09-19-2011, 02:39 PM   #543
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
Hello Ben,

as a matter of fact Core.lang.getLocalizer is available in the sim.
Calling getLocalizer: function (category, strings) with a set of localized strings should be possible.
If the resource-strings will be included in lang.ods then there might be a problem with passing the params to the "sandboxed" JS-code of calendar.
Kind regards
Mark
Hi Mark,

Hmmm, to be honest, I don't quite understand what to do!

I think the idea would be to put the strings into lang.ods so that it is easier for the translators. So would it be necessary, then, to do all the calls to Core.lang.getLocalizer in the Calendar.js (the calling code), putting the strings into variables which can then be used in the sandboxed code? But if that were the case, then I don't see how it would work in the Sim...

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 09-19-2011, 03:05 PM   #544
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: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Another thought:
define var L = Core.lang.getLocalizer("Calendar");
in the startup-code (Calendar.js) and export it via kbook.autoRunRoot.sandbox.L = L;
In calendar.js it should be possible to use
L = kbook.autoRunRoot.L;
and then
L("anyString");

As Sim dosn't read lang.ods you will have to copy appropriate xx.js language files (e.g. from a beta-build) to eBookSim\core\lang
HTH
Mark
Mark Nord is offline   Reply With Quote
Old 09-19-2011, 10:54 PM   #545
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
Another thought:
define var L = Core.lang.getLocalizer("Calendar");
in the startup-code (Calendar.js) and export it via kbook.autoRunRoot.sandbox.L = L;
In calendar.js it should be possible to use
L = kbook.autoRunRoot.L;
and then
L("anyString");

As Sim dosn't read lang.ods you will have to copy appropriate xx.js language files (e.g. from a beta-build) to eBookSim\core\lang
HTH
Mark
Hi Mark,

That makes sense. I will try this when I get a chance...

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Advert
Old 09-19-2011, 11:54 PM   #546
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Hi everyone,

By the way, I slept on it, and realised the Draughts code could handle compulsory jumping. So when I get time, I will have another go.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 09-20-2011, 11:37 AM   #547
VICTORSJG
Addict
VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.
 
Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
Ben i've seen in calendar.js the keyboard is loaded once at startup, i don't know if the different keyboards could be loaded selecting them via a menu on prs settings wich user wants to choose, once these keyboards have been defined in calendar.js.
VICTORSJG is offline   Reply With Quote
Old 09-20-2011, 11:53 AM   #548
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by VICTORSJG View Post
Ben i've seen in calendar.js the keyboard is loaded once at startup, i don't know if the different keyboards could be loaded selecting them via a menu on prs settings wich user wants to choose, once these keyboards have been defined in calendar.js.
Hi Victor,

Yes, the plan is to be able to choose different keyboards using the Calendar options popup. However, this involves extending the number of keys on the popup which will also affect the format of the keyboard file. So, while the potential is there, the actual implementation of alternate keyboards might take a while.

However, for people like yourself who build your own PRS+, you can modify the western.kbd file and put in your own characters. This will then be loaded when the Calendar starts. (Note that if this file is missing, Calendar just loads the regular western keyboard anyway! So it is not strictly required, I just did it this way so that people could do their own keyboards.)

It should be obvious how the file works. There are basically 4 "pages" of characters, 2 for letters and 2 for symbols, with SHIFT to switch between the lower and uppercase letters, and the 2 symbol pages. You will quickly find, however, that there is only room for 26 characters each on the four different "pages". This is why we need to extend the number of keys on the popup. In the meantime, you will need to sacrifice some of the symbol keys for any extra letters your language requires.

Hope this helps!

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 09-20-2011, 11:54 AM   #549
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by kartu View Post
Hi Ben,

the reported problem is, that capturing is not mandatory.

PS
Wanted to raise issue of not being able to capture backwards, but I guess it's ok according to English Draughts rules.
Hi kartu,

You can inform the person who made the original request that I have added the option to make capturing compulsory. I have also added the option to allow pawns to capture backwards. The changes have been pushed to the default and apps repositories.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 09-20-2011, 11:57 AM   #550
VICTORSJG
Addict
VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.
 
Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
Quote:
Originally Posted by BenChen View Post
Hi Victor,

Yes, the plan is to be able to choose different keyboards using the Calendar options popup. However, this involves extending the number of keys on the popup which will also affect the format of the keyboard file. So, while the potential is there, the actual implementation of alternate keyboards might take a while.

However, for people like yourself who build your own PRS+, you can modify the western.kbd file and put in your own characters. This will then be loaded when the Calendar starts. (Note that if this file is missing, Calendar just loads the regular western keyboard anyway! So it is not strictly required, I just did it this way so that people could do their own keyboards.)

It should be obvious how the file works. There are basically 4 "pages" of characters, 2 for letters and 2 for symbols, with SHIFT to switch between the lower and uppercase letters, and the 2 symbol pages. You will quickly find, however, that there is only room for 26 characters each on the four different "pages". This is why we need to extend the number of keys on the popup. In the meantime, you will need to sacrifice some of the symbol keys for any extra letters your language requires.

Hope this helps!

Sincerely,
Ben.
I had already modified this file to create one with the characters i want to use.

thanks

Last edited by VICTORSJG; 09-20-2011 at 11:59 AM.
VICTORSJG is offline   Reply With Quote
Old 09-20-2011, 03:54 PM   #551
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: 314486
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by Mark Nord View Post
Another thought:
define var L = Core.lang.getLocalizer("Calendar");
in the startup-code (Calendar.js) and export it via kbook.autoRunRoot.sandbox.L = L;
In calendar.js it should be possible to use
L = kbook.autoRunRoot.L;
and then
L("anyString");
You sure noticed that I mixed up real-device and Sim
For the Sim it should read
define var L = _Core.lang.getLocalizer("Calendar");
in the startup-code (setView.js) and export it via
kbook.autoRunRoot.L = L;

default language is set in ebookSim\user.config

Regards
Mark
Mark Nord is offline   Reply With Quote
Old 09-21-2011, 05:42 AM   #552
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by Mark Nord View Post
You sure noticed that I mixed up real-device and Sim
For the Sim it should read
define var L = _Core.lang.getLocalizer("Calendar");
in the startup-code (setView.js) and export it via
kbook.autoRunRoot.L = L;

default language is set in ebookSim\user.config

Regards
Mark

Hi Mark,

I tried the following in setView.js, but the Calendar app won't start.

Code:
      	 case "Calendar" : {
      					kbook.autoRunRoot._icon = 22;
      					kbook.autoRunRoot._title = "Calendar";				
      					kbook.autoRunRoot.getFileContent = _Core.io.getFileContent;
						kbook.autoRunRoot.setSoValue = _Core.system.setSoValue;
      					kbook.autoRunRoot.startsWith = _Core.text.startsWith;
						var L = _Core.lang.getLocalizer("Calendar");
						kbook.autoRunRoot.L = L;
      					this.MAIN.EINK.VIEW.setURI("../addons/Calendar/calendar.xml");				
      					break;
      					}
If I comment out "var L = _Core.lang.getLocalizer("Calendar");" the app starts, but obviously the localised strings don't work. Any thoughts?

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Old 09-21-2011, 11:57 AM   #553
VICTORSJG
Addict
VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.VICTORSJG once ate a cherry pie in a record 7 seconds.
 
Posts: 318
Karma: 1846
Join Date: Dec 2009
Device: PRS-505
Ben, this image appears when the chess is started the first time on prs 505, the following starts once other apps is opened and closed, chess works well.
Attached Thumbnails
Click image for larger version

Name:	2011-9-21.jpg
Views:	226
Size:	44.2 KB
ID:	76752  

Last edited by VICTORSJG; 09-22-2011 at 02:54 PM.
VICTORSJG is offline   Reply With Quote
Old 09-22-2011, 11:05 AM   #554
kartu
PRS+ author
kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.kartu ought to be getting tired of karma fortunes by now.
 
Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
AI opponent doesn't make a move reported here.

kartu is offline   Reply With Quote
Old 09-22-2011, 12:58 PM   #555
BenChen
EPUB Metadata ******
BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.BenChen is not intimidated by interfenestral monkeys.
 
Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
Quote:
Originally Posted by kartu View Post
AI opponent doesn't make a move reported here.
Hi kartu,

I am not sure there is much I can do. When the Reader is in slow mode, it is really slow (even with only a few black pieces to work through). There has been one occasion where I waited for ten minutes and it never moved. I gave up waiting: it may have hung, I couldn't tell.

But when I have some time, I will make a save game of the screenshot, load it onto my reader and see what happens when I force an AI move for black.

Sincerely,
Ben.
BenChen is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fsk error, code = -13 Brian Charles Sony Reader 4 04-23-2010 04:21 PM
Fsk error code= -43 shrktank Sony Reader 1 12-24-2009 09:32 AM
Just a silly tweak: AUTORUN.INF for Windows Rootman Kindle Developer's Corner 3 12-04-2009 10:17 AM
Request for test in Windows XP kovidgoyal Calibre 5 08-26-2009 01:14 PM
Windows Develpment Environment issue itimpi Calibre 20 01-17-2009 07:15 PM


All times are GMT -4. The time now is 02:51 AM.


MobileRead.com is a privately owned, operated and funded community.