View Single Post
Old 08-15-2007, 01:53 PM   #16
diabloNL
Gadget ForceŽ
diabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with othersdiabloNL plays well with others
 
diabloNL's Avatar
 
Posts: 705
Karma: 2733
Join Date: Jun 2006
Location: The Netherlands
Device: Sony PRS-300 + Cybook with funny screen :P
Quote:
Originally Posted by Nogg View Post
I'm still trying to get the hang of the way things are set up in the reader (I got a nice infinite loop last night), but couldn't you create a stub function to replace one of the mutes in applicationstart and then add the functionality in main by overriding that function?
Tried that and it didn't work.


Quote:
Originally Posted by Nogg View Post
I'm doing something similar with my testing where I override doLeft and doRight in main.xml to produce the joystick page flip functionality there, instead of remapping it in applicationStart. The only difference is that I'm relying on their built-in functions.
I'm using that a lot. So by using for example this in main.xml:

Code:
<function id="doLeft">
{Some code}
</function>
With that you can use your own code that starts when the joystick left is pressed. The PROBLEM here is that I haven't figured out how to call the original function. For example:


Code:
<function id="doLeft">
if (a == 1) {
this.doRight();
}
else {
this.doLeft();
}
</function>
This won't work because it will call it's own function that it's in. Creating a loop. So it's not possible to do the original joystick left function when a !=1 We need to find out how to listen to the keys itself rather then the function they do.
diabloNL is offline   Reply With Quote