Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 38
Registered: ‎07-29-2008
My Device: Simulator

Capturing trackball movement

[ Edited ]

Hi,

 

I am developing on JDE 4.6 with the 9000 simulator. The trackball simulation has been working (I can select menu move around the main screen, etc) but for some reason it's not triggering navigationMovement in the code. Is there other methods that capture the trackball movement? or did I not setup the trackball capturing properly? (I only overrided the navigationMovement method.) I'd appreciate any help you have recommend.

 

Thanks,

Kenny

Message Edited by yyhokenny on 01-22-2009 02:28 AM
Highlighted
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Capturing trackball movement

Screen.navigationMovement() is the correct method to use, and this works as documented in 4.6.

 

Are you sure you didn't accidentally overload the method (wrong parameters or types, for example?)

 

To properly override this method, your method needs to match this signature:

 

protected boolean navigationMovement(int dx,
                                     int dy,
                                     int status,
                                     int time)

Developer
Posts: 38
Registered: ‎07-29-2008
My Device: Simulator

Re: Capturing trackball movement

Ah Ha!  Thanks RexDoug!  Your "Screen.navigationMovement" pointed me to the right direction.  I overrided the navigationMovement in my Field implementation but I didn't override the method in my custom screen to pass it to the field.  Thanks!