![]() |
#3511 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 238
Karma: 6875
Join Date: Feb 2009
Location: Netherlands
Device: Kindle PW2
|
You can't 'call' an option using onSettingsChanged. onSettingsChanged itself is called by Core.settings after changing the option - and the setting is saved by Core.settings as well. To properly 'call' an option, you have jump to a temporary setting node, like is done in the ChangeEpubCSS action. Alternatively, you can have your action change the option value directly, and then call Core.settings.saveOptions(addon).
|
![]() |
![]() |
![]() |
#3512 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
What are .z5, .z8, & .zblorb files? |
|
![]() |
![]() |
![]() |
#3513 |
EPUB Metadata ******
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 525
Karma: 26874
Join Date: Dec 2010
Device: Kobo Glo HD
|
These are Interactive Fiction files for the Z-machine. They allow authors to distribute their games widely, since Z-machine interpreters (like Frotz and Nitfol) have been written for many different platforms. .z8 allow for a bigger game than .z5 and .zblorb ones can also include graphics and sound (however on the PRS+ Interactive Fiction App they just run without graphics and sound).
See http://en.wikipedia.org/wiki/Z-machi...interpreter%29 for more details. Sincerely, Ben. |
![]() |
![]() |
![]() |
#3514 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Thank you quisvir - I try to mangage it.
A. |
![]() |
![]() |
![]() |
#3515 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
quisvir:
Question: Is there a command/function which saves not already saved data in system-cache? Reason: I work on my auto-restart-code. For the 350 your code (formatting non existend cards) works better. Sometimes my dirty-reader-crashing code prevents to save reading-progress. After a restart the 'old' progress is used. Very unconvenient. Idea: When first saving properly the system-cache and then let restart reader it could solve the problem. Another question: Is it possible to use a CONFIRM DIALOGUE inbetween a SWITCH-block? I have a ACTION, which functions well: Code:
{ name: "RestoreLastPRS", title: LA("ACTION_PRS_RESTORE_LAST"), group: "SAVE_RESTORE", icon: "BACK", action: function () { var dialog = kbook.model.getConfirmationDialog(); dialog.onOk = function () { Core.shell.exec('cp -R -f /Data/database/system/PRSPlus/PRSave3/prsp /opt0'); } dialog.onNo = function () { break; } dialog.openDialog(LA("MSG_QUESTION_RESTORE_PRS"), 0); } }, Code:
restoreData = function (type) { switch (type) { ... case 'UNDOPRS': Core.shell.exec('cp -R -f /Data/database/system/PRSPlus/PRSave3/prsp /opt0'); break; } Code:
restoreData = function (type) { switch (type) { ... case 'UNDOPRS': { var dialog = kbook.model.getConfirmationDialog(); dialog.onOk = function () { Core.shell.exec('cp -R -f /Data/database/system/PRSPlus/PRSave3/prsp /opt0'); } dialog.onNo = function () { break; } dialog.openDialog(LA("MSG_QUESTION_RESTORE_PRS"), 0); } } I tried it with much simpler code, no chance. Thank you Last edited by Analogus; 03-09-2012 at 07:20 AM. |
![]() |
![]() |
![]() |
#3516 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 238
Karma: 6875
Join Date: Feb 2009
Location: Netherlands
Device: Kindle PW2
|
Quote:
Code:
kbook.model.commitCache(); Spoiler:
The break statement at the end of a case is optional. Without it, the next case(s) will be executed as well. Additionally: getConfirmationDialog resets the dialog, so you don't have to define a 'do nothing' onNo function. Last edited by quisvir; 03-09-2012 at 11:51 AM. |
|
![]() |
![]() |
![]() |
#3517 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Thank you!
Restart working. Sadly the switch doesn't work... But at least I know that it should. A. |
![]() |
![]() |
![]() |
#3518 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 136
Karma: 493152
Join Date: Mar 2012
Location: Spain
Device: Kindle Oasis 2
|
|
![]() |
![]() |
![]() |
#3519 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
There is no repository.
Following the part of the code which makes troubles (I'm actually splitting my code): Analogus_Options.zip There are 2 problems: 1) Function 'SystemfontData': there I want to add a YES/NO-question. It doesn't work as suggested above. 2) Function 'batteryData': I want to store the option-values to be restored on a restart of the reader. I didn't get it working so far. A. Edit: saving OPTION working now... Last edited by Analogus; 03-10-2012 at 09:15 AM. |
![]() |
![]() |
![]() |
#3520 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 136
Karma: 493152
Join Date: Mar 2012
Location: Spain
Device: Kindle Oasis 2
|
Quote:
|
|
![]() |
![]() |
![]() |
#3521 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Question to developers:
I have made a FUNCTION in say A.JS. How do I call the function in B.JS when needed? A. |
![]() |
![]() |
![]() |
#3522 |
PRS+ author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,637
Karma: 2446233
Join Date: Dec 2007
Device: Sony PRS-300, 505, 600, 650, 950
|
Why not use "clone" feature of the Google Code?
PRS+ is GPL licensed, so if you are distributing alternative builds, you must provide sources of them as well. Depends how those js files are initialized. In general, each function (and js is normally initialized as a separate function) has it's own namespace. If files are combined prior to be initialized, then it's the same namespace and everything should be visible. Last edited by kartu; 03-10-2012 at 09:17 AM. |
![]() |
![]() |
![]() |
#3523 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 568
Karma: 2170348
Join Date: Apr 2011
Device: 2x Sony PRS-350; PRS-300 (†), Paperwhite (†), Voyage
|
Quote:
Sorry, I'm new to programming and the world of open source... Thanks for helping with calling functions as well. A. |
|
![]() |
![]() |
![]() |
#3524 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 470
Karma: 112801
Join Date: Aug 2010
Device: Aura H2O (i86, M96C, Mini&Glo, PRS-950, STR, K-Touch, K-DX, K-3)
|
Just installed 2.1 Alpha on my 950.
Outstanding! The ability to assign Press-and-Hold Button functions to things such as Change CSS and Rotation saves about a zillion tap-and-waits. Thanks guys! Last edited by EldRick; 03-11-2012 at 12:59 PM. |
![]() |
![]() |
![]() |
#3525 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jun 2011
Device: Sony PRS 505
|
Code:
<a href="#20120311"><b>11</b></a> <a name="20120311"></a> ebook, in epub, is simple html file with links inside it, like 2 above. As far as I understand, when you click on 1st link you should jump to 2nd one, it's working like that in calibre or in sigil, but on prs you'll jump to the end of book. Is it prs+ error, or sony firmware? |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using HD Folders as Collections on Sony PRS-505 | fglaysher | Calibre | 8 | 07-26-2010 09:55 PM |
Enhanced Firmware for V3 | keng2000 | HanLin eBook | 12 | 04-12-2010 09:30 AM |
Poll: Sony Reader PRS-505 upgrade to Sony PRS-700 | Kris777 | Sony Reader | 70 | 02-18-2009 06:34 PM |
Sony Reader PRS-505 upgrade to Sony PRS-700 | Kris777 | Sony Reader | 23 | 12-08-2008 06:56 AM |
Sub folders in firmware v1.08 | Prince Hal | Amazon Kindle | 28 | 10-23-2008 03:20 PM |