Skip to main content

LWUIT and commands on BB

5 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi,
there is currently no mapping/detection of the back button key for
blackberrys. You can set this by detecting the key code and setting
the back button yourself using the jad file.
To do so just print out the key code that occurs when pressing the
back button:

Form myForm = new Form(...) {
public void keyPressed(int key) {
// print out the key code somewhere
super.keyPressed(key);
}
};

Then you can map that code to the backbutton of the blackberry by
adding "SoftKey-Back=keyCodeNumber" to the jad file.

> Hello,
>
> i am using LWUIT on a BB-device. The problem i found is, that a normal
> MIDlet which implements CommandListener interface handles BB-keys
> in an
> other way the LWUIT ActionListener does. I do not know whats the
> problem
> about this. On the BB their is a "back-button" (i would call it
> like this),
> if i use LWUIT pressing this button is ignored - nothing happens.
>
> Can someone tell me whats the matter about this?
>
> Thank you, Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

Penyihir Kecil

is there another way to do something similiar like that.... ??

==============================================
Form myForm = new Form(...) { public void keyPressed(int key) {
// print out the key code somewhere
super.keyPressed(key);
}
};

==============================================

it's more easier if keyPressed implementation is like Comand (ActionListener with ActionPerformed Method) so i can separete between the form inisialitation and the event of key pressed.

thnx u

dwi ardi irawan - 'penyihirkecil'
http://dwiardiirawan.blogspot.com

--- On Fri, 7/25/08, Shai Almog wrote:
From: Shai Almog
Subject: Re: LWUIT and commands on BB
To: users@lwuit.dev.java.net
Date: Friday, July 25, 2008, 8:26 PM

Hi,there is currently no mapping/detection of the back button key for blackberrys. You can set this by detecting the key code and setting the back button yourself using the jad file.To do so just print out the key code that occurs when pressing the back button:
Form myForm = new Form(...) { public void keyPressed(int key) {
// print out the key code somewhere
super.keyPressed(key);
}
};
Then you can map that code to the backbutton of the blackberry by adding "SoftKey-Back=keyCodeNumber" to the jad file.

Hello,
i am using LWUIT on a BB-device. The problem i found is, that a normalMIDlet which implements CommandListener interface handles BB-keys in another way the LWUIT ActionListener does. I do not know whats the problemabout this. On the BB their is a "back-button" (i would call it like this),if i use LWUIT pressing this button is ignored - nothing happens.
Can someone tell me whats the matter about this?
Thank you, Christian

---------------------------------------------------------------------To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.netFor additional commands, e-mail: users-help@lwuit.dev.java.net

Shai Almoghttp://lwuit.blogspot.com/

[att1.html]

chen

Hi,
Currently you can't listen to the key events in a different way, it's a
valuable feedback we need to consider to add such a listener.

Thanks,
Chen

Penyihir Kecil wrote:
> is there another way to do something similiar like that.... ??
>
> ==============================================
> Form myForm = new Form(...) {
> public void keyPressed(int key) {
> // print out the key code somewhere
> super.keyPressed(key);
> }
> };
>
> ==============================================
>
> it's more easier if keyPressed implementation is like Comand
> (ActionListener with ActionPerformed Method) so i can separete between
> the form inisialitation and the event of key pressed.
>
> thnx u
>
> dwi ardi irawan - 'penyihirkecil'
> http://dwiardiirawan.blogspot.com
>
>
> --- On *Fri, 7/25/08, Shai Almog //* wrote:
>
> From: Shai Almog
> Subject: Re: LWUIT and commands on BB
> To: users@lwuit.dev.java.net
> Date: Friday, July 25, 2008, 8:26 PM
>
> Hi,
> there is currently no mapping/detection of the back button key for
> blackberrys. You can set this by detecting the key code and
> setting the back button yourself using the jad file.
> To do so just print out the key code that occurs when pressing the
> back button:
>
> Form myForm = new Form(...) {
> public void keyPressed(int key) {
> // print out the key code somewhere
> super.keyPressed(key);
> }
> };
>
> Then you can map that code to the backbutton of the blackberry by
> adding "SoftKey-Back=keyCodeNumber" to the jad file.
>
>
>
>> Hello,
>>
>> i am using LWUIT on a BB-device. The problem i found is, that a
>> normal
>> MIDlet which implements CommandListener interface handles BB-keys
>> in an
>> other way the LWUIT ActionListener does. I do not know whats the
>> problem
>> about this. On the BB their is a "back-button" (i would call it
>> like this),
>> if i use LWUIT pressing this button is ignored - nothing happens.
>>
>> Can someone tell me whats the matter about this?
>>
>> Thank you, Christian
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>>
>> For additional commands, e-mail: users-help@lwuit.dev.java.net
>>
>>
>
> Shai Almog
> http://lwuit.blogspot.com/
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Qunhuan Mei

Hi LWUIT team,

I have been trying to use Command on Button, i.e. using "new Button(command cmd) ...".
Seems to me this is a very good design idea. By initialising a button with a command, we can unify all button and command and handlings with a name and an ID.

But the problem is there seems to be no interface to access the command id, and evt.getCommand() in this case always returns null. Using ((Button)evt.getSource()).getText() could query the command name, but this is not very convenient.

Ideally, I would suggest to have:

1. evt.getButton().getCommand() or
2. evt.getCommand()

available along the line.

What do you think?

Thanks,

Qunhuan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

chen

Hi,
I see your point, we will discuss this.

Thanks,
Chen

Qunhuan Mei wrote:
> Hi LWUIT team,
>
> I have been trying to use Command on Button, i.e. using "new Button(command cmd) ...".
> Seems to me this is a very good design idea. By initialising a button with a command, we can unify all button and command and handlings with a name and an ID.
>
> But the problem is there seems to be no interface to access the command id, and evt.getCommand() in this case always returns null. Using ((Button)evt.getSource()).getText() could query the command name, but this is not very convenient.
>
> Ideally, I would suggest to have:
>
> 1. evt.getButton().getCommand() or
> 2. evt.getCommand()
>
> available along the line.
>
> What do you think?
>
> Thanks,
>
> Qunhuan
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net