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 08-20-2007, 08:05 PM   #16
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
nogg, i created doDigit function in menu group, can't find a method that will call its original doDigit, so I can do the original when not in book list section, i tried following none seems to work:

this.bubble("doDigit")
this.digit(part)
this.getModel().doDigit(part)

any idea?
ns66 is offline   Reply With Quote
Old 08-20-2007, 11:52 PM   #17
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
This should work:

<function id="doDigit" params="part"><![CDATA[
this.getModel().doDigit(part);
]]></function>

You have to have the CDATA part for it to work though.
Nogg is offline   Reply With Quote
Advert
Old 08-21-2007, 03:20 AM   #18
alexbe
Junior Member
alexbe began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2007
Device: Sony Reader
Nogg,

does your hack 6.2 keep old Enter function inside book - to jump between links (usually to notes in the end of book, and back to current page)?
alexbe is offline   Reply With Quote
Old 08-21-2007, 03:31 AM   #19
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
Yes, the primary reason I made the hack was so it would have both functions.

If you're on an active link (and haven't pressed page numbers), it will follow links as usual.
If you have pressed numbers and the "Go to..." message is on screen, pressing enter will activate the Direct Page Control.
Nogg is offline   Reply With Quote
Old 08-21-2007, 03:40 AM   #20
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
ok i tried it doesn't work, i added the function under menu group:

<function id="doDigit" params="part"><![CDATA[
var keyCode = part.key.charCodeAt(0);

e = this.countPages();

if(e>10)
{
if (keyCode == 0x30) {
this.setPage(Math.round((e*10)/11}
else if (keyCode > 0x30) {
this.setPage(Math.round((e*(keyCode-0x30))/11))}
}
else
{
this.getModel().doDigit(part);
}
]]></function>

when in book list section with 50 pages, it works fine jumping to N% pages, but when in other menus with 1 page, instead of doing the original digit function, nothing happened...either e!=1 there or the this.getModel().doDigit(part); doesn't work

any idea?

Last edited by ns66; 08-21-2007 at 03:44 AM.
ns66 is offline   Reply With Quote
Advert
Old 08-21-2007, 04:02 AM   #21
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
Bunch of crazy nonsense where I assumed too much without looking at it. Maybe I need a nap.

Last edited by Nogg; 08-21-2007 at 04:14 AM. Reason: I'm a little crazy sometimes
Nogg is offline   Reply With Quote
Old 08-21-2007, 04:07 AM   #22
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
Hm, on second thought. I was just looking at some of the code in main.xml and I may be wrong about CDATA meaning C explicitly. Now I'm not so sure. And I'm sleepy. I'll take a look tomorrow and see if I can puzzle it out.

BTW, did you copy that code, or hand type it? I notice some missing parentheses...
Nogg is offline   Reply With Quote
Old 08-21-2007, 05:16 AM   #23
alexbe
Junior Member
alexbe began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jul 2007
Device: Sony Reader
Nogg, first of all i would thank you for working on these interesting things, which we all find wery usefull

i just flashed your 6.2 patch. direct page jump function and jumping between links both seem to work well. but round button now works as history button. this is not covered in 6.2 patch description. could we get patch version wich exactly follows specification (clock and direct page navigation by pressing Enter. all othes same as in original Sony)?

(probably we just do not need to include applicationStart.xml in 6.2 hack?)

compared applicationStart.xml 6.2 and original and quickly figured out the difference. changed for what i wanted and now im happy

Last edited by alexbe; 08-21-2007 at 05:56 AM.
alexbe is offline   Reply With Quote
Old 08-21-2007, 12:48 PM   #24
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
Quote:
Originally Posted by Nogg View Post
Hm, on second thought. I was just looking at some of the code in main.xml and I may be wrong about CDATA meaning C explicitly. Now I'm not so sure. And I'm sleepy. I'll take a look tomorrow and see if I can puzzle it out.

BTW, did you copy that code, or hand type it? I notice some missing parentheses...
yeah i hand changed a bit about formating so don't worry about the missing parentheses
i thought ![CDATA[ usually used for escape purpose
ns66 is offline   Reply With Quote
Old 08-21-2007, 01:16 PM   #25
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
Quote:
Originally Posted by alexbe View Post
Nogg, first of all i would thank you for working on these interesting things, which we all find wery usefull

i just flashed your 6.2 patch. direct page jump function and jumping between links both seem to work well. but round button now works as history button. this is not covered in 6.2 patch description. could we get patch version wich exactly follows specification (clock and direct page navigation by pressing Enter. all othes same as in original Sony)?

(probably we just do not need to include applicationStart.xml in 6.2 hack?)

compared applicationStart.xml 6.2 and original and quickly figured out the difference. changed for what i wanted and now im happy
Currently I'm working on a new app which will hopefully allow anyone to customize any and all hacks available to their own specification. The main consequence of this is that I'm not going to post any more updates to the zip files, as that would only delay the app's progress.

I'm glad you figured out a solution! Just so everyone knows, if you don't include applicationStart as part of this hack, it will not work.
Nogg is offline   Reply With Quote
Old 08-21-2007, 01:21 PM   #26
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
ns66:
One thing occurs, and this is just a shot in the dark, but the
var keyCode = part.key.charCodeAt(0);
line may be consuming that character, thus not passing it on to the doDigit function.

Try adding
var keyCode2 = part.key.charCodeAt(0);
just above
var keyCode = part.key.charCodeAt(0);

and see if it still works when you have e>10
Nogg is offline   Reply With Quote
Old 08-21-2007, 01:59 PM   #27
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
this code is in the original hard_reset code (sony code?)

<function id="doDigit" params="part">
var keyCode = part.key.charCodeAt(0);
if (keyCode == 53) /* 5 */
this.bubble("doHardReset");
else
this.getModel().doDigit(part);
</function>

so i don't think that's the problem
ns66 is offline   Reply With Quote
Old 08-21-2007, 02:38 PM   #28
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
with this code:

var keyCode2 = part.key.charCodeAt(0);
var keyCode = part.key.charCodeAt(0);
e = this.countPages();

if (keyCode == 0x30) {
this.setPage(Math.round((e*10)/11));
}
else if (keyCode == 0x31) {
this.bubble("doDigit");
}
else if (keyCode == 0x32) {
this.digit(part);
}
else if (keyCode == 0x33) {
this.getModel().doDigit(part);
}
else if (keyCode == 0x34) {
this.setPage(Math.round((e*4)/11));
}

in book list section, 0, 4 works, 1, 2 nothing happened, 3 got a "-" failed indicator for a sec
so it seems the problem is the function to call old code is not any of those
ns66 is offline   Reply With Quote
Old 08-21-2007, 03:11 PM   #29
Nogg
Literate!
Nogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it isNogg knows what time it is
 
Posts: 256
Karma: 2247
Join Date: Mar 2007
Device: PRS-500
does just this work:

<function id="doDigit" params="part"><![CDATA[
this.getModel().doDigit(part);
]]></function>

If so, I'd say use that and slowly build it up to see what's corrupting it. If not, I don't know what to say.
Nogg is offline   Reply With Quote
Old 08-21-2007, 09:37 PM   #30
ns66
Connoisseur
ns66 doesn't litterns66 doesn't litter
 
Posts: 78
Karma: 156
Join Date: Jul 2007
Device: sony reader
i guess put this on hold
ns66 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
remember the last page for Newspaper Direct? HansTWN iRex 4 08-10-2010 04:13 AM
PRS505 Direct Page Control? volwrath Sony Reader Dev Corner 6 01-02-2009 10:17 AM
Use Enter key to turn page lovebeta Sony Reader Dev Corner 5 11-27-2008 05:26 PM
PRS-500 Direct Page Control Hack diabloNL Sony Reader Dev Corner 73 06-01-2008 04:32 PM
PRS-500 Help modifying the Direct Page Control hack DoctorBri Sony Reader Dev Corner 4 12-30-2007 04:52 PM


All times are GMT -4. The time now is 07:18 PM.


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