Skip to main content

Blackerry OS 7, LWUIT 1.5 and touch event

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
7 replies [Last post]
Geobert
Offline
Joined: 2011-09-07

HI!

I'm new on LWUIT and BB development and I've found some weird thing in the touch event management.

First, the BlackBerryTouchImplementation is not instanciate in ImplementationFactory: line is commented. I've uncommented it (and commented the BlackBerryImplementation instanciation), and the Button were not triggering their attached command.

After some code tracking, we found out that the event sent by RIM are Touch.DOWN and Touch.UP that leads to pointerHoverPressed and pointerHoverReleased and never to pointerPressed and pointerReleased which need Touth.CLICK and Touch.UNCLICK.

I've made a hack in Display, inverting POINTER_HOVER_PRESSED/RELEASED and POINTER_PRESSED/RELEASED actions and the Button now works.

What's wrong here? Are the Touch constant inverted?

Thanks for any help.

Geobert, for Airtag

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
umairqureshi_6
Offline
Joined: 2013-05-02

i am new on lwuit, using blackberryTouchPort.jar for Blackberry 9900
but it doesnt work,
can anybody help in this regard ?

vprise
Offline
Joined: 2003-11-07

You need to use the Netbeans pre-processor for the RIM version and pick NewOS or NewOSSigned (and JDE 5.0) to build for RIM.

Do not change the code, it works fine and isn't inverted. Hover is useful only for Blackberry Storm devices.

Geobert
Offline
Joined: 2011-09-07

We use eclipse for our dev here, and the code was tested on Blackberry Bold 9900, the buttons do not work without the hack describe above :/

chenf
Offline
Joined: 2008-04-29

Thanks for the bug report, I check it and we had a bug, I have fixed the bug in the svn.

We will try to release an update release which includes this bug fix , meantime use the code from the repository.

Thanks,

Chen

Geobert
Offline
Joined: 2011-09-07

Thank you very much! I've patched 1.5 with the fix and uncommented all the //# concerning ifdef touch, it seems to works well :)

All the best,

Geobert for Airtag

liptaka
Offline
Joined: 2011-01-26

Thanks

liptaka
Offline
Joined: 2011-01-26

Hello Geobert,

Recently I am having the same issue with my midlet for BB 9900, using LWUIT 1.4
with BlackberryTouchPort.jar.
I see that the buttons only gets the focus when touched, but nothing happens then.

I am using netbeans with blackberry jde and blackberry ant tools to produce
cod file.

I do not really understand the above solution.
What should I exactly do?

Thank you in advance for your feedback,
liptaka