![]() |
#31 | ||||
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Execpt of runScript, as I haven't ported "libfskLoad.so" to Windows-Dll and all "real-device-kbook" related stuff. With release x.02 Core is loaded via JS new Function, therewith "sandboxed" and can be called from autorun-js direct. With release x.03 Core is loaded via prsp.compile and executed in the scope of bytecode. So all nonscriptable fsk and fskin objects could be adressed, but Core-functions are invisible to "sandbox" JS like in autorun.js. Here you have to used the wrapped functions _Core. or reference it via var Core = _Core. (See the dictionary code in the last sim package) Quote:
Quote:
Quote:
Last edited by Mark Nord; 11-18-2010 at 06:07 AM. |
||||
![]() |
![]() |
![]() |
#32 | |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Click enabled Sudoku
Quote:
Although I wasn't able to define new handler via <code>, like it is working for buttons, we can tweak the behavior! The "nonTouch" menu for the 505 and 300 is moved to so named group and set to invisible, another group "Touch" with a standard fsk-menu is introduced. (I havn't checked if kartu's PRS+ popup-menu is touch enabled and suitable for this.) This menu seams to exist in the scope of DOCUMENT, even if definde in the group "Touch". Thus leading to a nasty behavior of the Sim. After exiting the app the Sim will lose focus. No more clicks are processed. But the app is not frozen, as you can close it via right click on the Windows-Programm-Bar. [EDIT] Issue solved by calling menuBar.endLoop(ev) for both Sim and PRS-600[/EDIT] And so there is a first preview of a click (maybe touch) enabled Sudoku. Known issues:
[EDIT 21.12.2010] Sudoku_menubar_endLoop_v3.zip attached, all Issues cleared, full functional in Sim and PRS-505 getSoValue is explicit declared, so there are no dependencies to PRS+, should even run as Autorun.App Possible further enhancements:
[ADD] in target.init = function () Code:
if(_Core.system.getSoValue == undefined){ Code:
if(!_Core || !_Core.system || !_Core.system.getSoValue){ 21.12.2010 To get Button-Input for models 505 and 300 each <group> needs at least on "focusable" <SPRITE> to process the event. [/ADD] [EDIT 14.02.2011] ..endloop_v4.zip Thanks to hcripe's findings now usable at PRS-600 [/EDIT] [ADD 21.2.2011] improved code (menus are visible with the Win-Animation) can be found in post #165 previous versions are momentary kept for reference [/ADD] Last edited by Mark Nord; 02-21-2011 at 08:38 AM. Reason: v4 of click enabled sudoku |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Mark, unfortunatelly Calc doesn't work, but I suspect I've got an outdated version. Could you please have a look?
http://code.google.com/p/prs-plus/so...pt/addons/Calc PS PRS+ popup menu is not touchscreen enabled yet. |
![]() |
![]() |
![]() |
#34 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
You are right the version in the Repository is the very basic one for the 505/300 even without topleft icon and without translation.
Lastest version (but I think w/o translation for the string "Calculator") is included in the x.03 download in this thread or in its own thread here Please note that the button-actions are realized really quick 'n dirty, and should be redone if the concept proofed working. There is also the problem of calling compiled PRS+Core function from within sandboxed JS-code. For the Calc I have explicit included the needed code for soGetValue. Have you already decided how to deal with this - also in regards of the dictionary-code for the 300? Last edited by Mark Nord; 11-19-2010 at 01:58 PM. |
![]() |
![]() |
![]() |
#35 |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
One of the easy ways to solve sandbox issue would be to bind handlers code from corresponding "starter" js files, as their code is not sandboxed. On the other hand, it will probably make it difficult to develop using your test environment, or will it not?
Just realized that Calc included into 2.0.3preview got there from 505/300's (I didn't plan to add it in the preview version for 600 before testing it myself, but it showed itself in menu customizer / key bindings and someone has used it ![]() What makes me wonder is why doesn't it show any UI on 600s. Since it works on 300, XML file doesn't contain any errors, so I would expect it to show some UI. |
![]() |
![]() |
Advert | |
|
![]() |
#36 | ||
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Code:
tmp=function(){var a={name:"Calculator",title:"Calculator",description:"scientific calculator",icon:"CROSSED_BOX",activate:function(){kbook.autoRunRoot.path=Core.config.addonsPath+"Calc/calculator.xml";kbook.autoRunRoot.enterIf(kbook.model);}, For the content of recources.img see attachment - But I'm sure you know what you packed into ![]() BTW I would prefere to use surquizu's Calc-Icon instead of "CROSSED_BOX" Quote:
If so, there will be no problems with the Sim. Last edited by Mark Nord; 11-20-2010 at 06:40 AM. |
||
![]() |
![]() |
![]() |
#37 | |||||
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Quote:
![]() Quote:
Quote:
Quote:
Quote:
|
|||||
![]() |
![]() |
![]() |
#38 | |||
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Quote:
But in the Sim the app dosn't reside in kbook.model.container, so I will have to find the correct sandbox ![]() |
|||
![]() |
![]() |
![]() |
#39 | ||
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
![]() |
#41 |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Mark, I'm debugging Calc on 600 now, cheching _Core get so value should look like this (or if _Core is not defined, call fails):
_Core || !_Core.system || !_Core.system.getSoValue Conversion from coordinates to button index doesn't seem to work. Trying to figure out why. Most likely it's because buttons are shifted a bit. Is there a reason not to use sender's id for operation lookup? |
![]() |
![]() |
![]() |
#42 |
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Your are right, the check for _Core.system.getSoValue is fare to deep.
No, as I wrote, the code is quick 'n dirty You will have to set gridCursor to invisible, too!! Maybe we need a trunc or round Code:
var x = _Core.system.getSoValue(sender,"x"); x = (x - 121 ) / 60 ; PS: _Core check in Sudoko is also wrong. Last edited by Mark Nord; 11-21-2010 at 01:47 PM. |
![]() |
![]() |
![]() |
#43 |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
There seems to be 81/37 pixel difference between test environment and the reader.
What is the purpose of popen/pclose functions? |
![]() |
![]() |
![]() |
#44 | ||
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
<panel id="EINK" skin="panel" left="81" top="37" width="600" height="800"> //E-Ink Display 600x800 Quote:
[Edit] Good eye! This should be openp() and closep()! We could define var simDX=0; var simDY=0; Append init() like this Code:
if(_Core == undefined){ simDX = 81; SimDY = 37; Code:
target.doButtonClick = function (sender) { this.showTime(); var x = _Core.system.getSoValue(sender,"x"); x = (x - 121 + simDX) / 60 ; var y = _Core.system.getSoValue(sender,"y"); y = (y - 287 + simDY) / 50; Last edited by Mark Nord; 11-21-2010 at 03:25 PM. |
||
![]() |
![]() |
![]() |
#45 | ||
2B || !2B
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 852
Karma: 194010
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
|
Quote:
Without the correction (1+2)*3=7 !! |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
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 |