Skip to main content

TextArea

32 replies [Last post]
Anonymous

OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and I've
got the Blackberry emulator working on NetBeans. So far so good. However,
I have two issues:

1. I can't seem to be able to respond to the thumb wheel being pushed down
on buttons. Any suggestions here would be appreciated.
2. I can't seem to be able to type anything into a text area. I've created
another project using LWUIT directly on Sun's emulator and I can't find a
way to type anything into the text area.

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Reply viewing options

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

I used isFocusPainted() (or something like that), but that seems like a hack
:)

On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
wrote:

> So does anyone know how to actually active "fire" the component? If the
> component supports command like a button, I can just activate the command,
> but how do you do it otherwise? TextArea doesn't have support for commands
> and the following code:
>
> public boolean trackwheelClick(int status, int time) {
> Display d = Display.getInstance();
>
> d.callSerially(new Runnable() {
> public void run() {
> Display d = Display.getInstance();
> Form f = d.getCurrent();
>
> if (f != null) {
> Component c = f.getFocused();
>
> if (c != null) {
> c.fireClicked();
> return true;
> }
> }
> }
> });
>
> return false;
> }
>
> I believe would work if it weren't for the fact fireClicked() is protected
>
>
> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
> wrote:
>
>> OK, so the key thing doesn't work but it turns out on the BlackBerry that
>> in a midlet application, the UIApplication objects, is not null, so we can
>> actually register a TrackwheelListener directly from the midlet.
>>
>> From there, since this is only day 2 of LWUIT, I have no idea how to get
>> this event to the currently focused LWUIT control itself but we do get
>> notifications at least.
>>
>>
>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>> wrote:
>>
>>> Looks like I spoke too soon. Following this technique, I've got the Sun
>>> CLDC emulator that ships with NetBeans working but following the same trick
>>> on the BB doesn't work.
>>>
>>> Any other suggestions?
>>>
>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>>> wrote:
>>>
>>>> Works like a charm, thank you very much.
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>>>>
>>>>> Hi Patrick,
>>>>> good to hear you are making progress ;-)
>>>>>
>>>>> The text area opens on the game "FIRE" key press. We use the game keys
>>>>> for all such navigations so we should get the game key for fire a press of
>>>>> the wheel and we should get left/right/up/down on moving that wheel.
>>>>> See my explanation for a similar issue in the iden devices:
>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>> essentially you can derive Form and see that the proper key events are
>>>>> delivered and what is the key code.
>>>>>
>>>>> Thanks,
>>>>> Shai.
>>>>>
>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>>>>> I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>> However, I have two issues:
>>>>>
>>>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>>>> down on buttons. Any suggestions here would be appreciated.
>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>> find a way to type anything into the text area.
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
[att1.html]

Bill Snyder

I used isFocusPainted() (or something like that), but that seems like a hack
:)

On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
wrote:

> So does anyone know how to actually active "fire" the component? If the
> component supports command like a button, I can just activate the command,
> but how do you do it otherwise? TextArea doesn't have support for commands
> and the following code:
>
> public boolean trackwheelClick(int status, int time) {
> Display d = Display.getInstance();
>
> d.callSerially(new Runnable() {
> public void run() {
> Display d = Display.getInstance();
> Form f = d.getCurrent();
>
> if (f != null) {
> Component c = f.getFocused();
>
> if (c != null) {
> c.fireClicked();
> return true;
> }
> }
> }
> });
>
> return false;
> }
>
> I believe would work if it weren't for the fact fireClicked() is protected
>
>
> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
> wrote:
>
>> OK, so the key thing doesn't work but it turns out on the BlackBerry that
>> in a midlet application, the UIApplication objects, is not null, so we can
>> actually register a TrackwheelListener directly from the midlet.
>>
>> From there, since this is only day 2 of LWUIT, I have no idea how to get
>> this event to the currently focused LWUIT control itself but we do get
>> notifications at least.
>>
>>
>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>> wrote:
>>
>>> Looks like I spoke too soon. Following this technique, I've got the Sun
>>> CLDC emulator that ships with NetBeans working but following the same trick
>>> on the BB doesn't work.
>>>
>>> Any other suggestions?
>>>
>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>>> wrote:
>>>
>>>> Works like a charm, thank you very much.
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>>>>
>>>>> Hi Patrick,
>>>>> good to hear you are making progress ;-)
>>>>>
>>>>> The text area opens on the game "FIRE" key press. We use the game keys
>>>>> for all such navigations so we should get the game key for fire a press of
>>>>> the wheel and we should get left/right/up/down on moving that wheel.
>>>>> See my explanation for a similar issue in the iden devices:
>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>> essentially you can derive Form and see that the proper key events are
>>>>> delivered and what is the key code.
>>>>>
>>>>> Thanks,
>>>>> Shai.
>>>>>
>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>>>>> I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>> However, I have two issues:
>>>>>
>>>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>>>> down on buttons. Any suggestions here would be appreciated.
>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>> find a way to type anything into the text area.
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
[att1.html]

Patrick Julien

Looks like I spoke too soon. Following this technique, I've got the Sun
CLDC emulator that ships with NetBeans working but following the same trick
on the BB doesn't work.

Any other suggestions?

On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
wrote:

> Works like a charm, thank you very much.
>
>
> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>
>> Hi Patrick,
>> good to hear you are making progress ;-)
>>
>> The text area opens on the game "FIRE" key press. We use the game keys for
>> all such navigations so we should get the game key for fire a press of the
>> wheel and we should get left/right/up/down on moving that wheel.
>> See my explanation for a similar issue in the iden devices:
>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>> essentially you can derive Form and see that the proper key events are
>> delivered and what is the key code.
>>
>> Thanks,
>> Shai.
>>
>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>> I've got the Blackberry emulator working on NetBeans. So far so good.
>> However, I have two issues:
>>
>> 1. I can't seem to be able to respond to the thumb wheel being pushed down
>> on buttons. Any suggestions here would be appreciated.
>> 2. I can't seem to be able to type anything into a text area. I've
>> created another project using LWUIT directly on Sun's emulator and I can't
>> find a way to type anything into the text area.
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Patrick Julien

OK, so the key thing doesn't work but it turns out on the BlackBerry that in
a midlet application, the UIApplication objects, is not null, so we can
actually register a TrackwheelListener directly from the midlet.

>From there, since this is only day 2 of LWUIT, I have no idea how to get
this event to the currently focused LWUIT control itself but we do get
notifications at least.

On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
wrote:

> Looks like I spoke too soon. Following this technique, I've got the Sun
> CLDC emulator that ships with NetBeans working but following the same trick
> on the BB doesn't work.
>
> Any other suggestions?
>
> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
> wrote:
>
>> Works like a charm, thank you very much.
>>
>>
>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>>
>>> Hi Patrick,
>>> good to hear you are making progress ;-)
>>>
>>> The text area opens on the game "FIRE" key press. We use the game keys
>>> for all such navigations so we should get the game key for fire a press of
>>> the wheel and we should get left/right/up/down on moving that wheel.
>>> See my explanation for a similar issue in the iden devices:
>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>> essentially you can derive Form and see that the proper key events are
>>> delivered and what is the key code.
>>>
>>> Thanks,
>>> Shai.
>>>
>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>>> I've got the Blackberry emulator working on NetBeans. So far so good.
>>> However, I have two issues:
>>>
>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>> down on buttons. Any suggestions here would be appreciated.
>>> 2. I can't seem to be able to type anything into a text area. I've
>>> created another project using LWUIT directly on Sun's emulator and I can't
>>> find a way to type anything into the text area.
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Patrick Julien

So does anyone know how to actually active "fire" the component? If the
component supports command like a button, I can just activate the command,
but how do you do it otherwise? TextArea doesn't have support for commands
and the following code:

public boolean trackwheelClick(int status, int time) {
Display d = Display.getInstance();

d.callSerially(new Runnable() {
public void run() {
Display d = Display.getInstance();
Form f = d.getCurrent();

if (f != null) {
Component c = f.getFocused();

if (c != null) {
c.fireClicked();
return true;
}
}
}
});

return false;
}

I believe would work if it weren't for the fact fireClicked() is protected

On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
wrote:

> OK, so the key thing doesn't work but it turns out on the BlackBerry that
> in a midlet application, the UIApplication objects, is not null, so we can
> actually register a TrackwheelListener directly from the midlet.
>
> From there, since this is only day 2 of LWUIT, I have no idea how to get
> this event to the currently focused LWUIT control itself but we do get
> notifications at least.
>
>
> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
> wrote:
>
>> Looks like I spoke too soon. Following this technique, I've got the Sun
>> CLDC emulator that ships with NetBeans working but following the same trick
>> on the BB doesn't work.
>>
>> Any other suggestions?
>>
>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>> wrote:
>>
>>> Works like a charm, thank you very much.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>>>
>>>> Hi Patrick,
>>>> good to hear you are making progress ;-)
>>>>
>>>> The text area opens on the game "FIRE" key press. We use the game keys
>>>> for all such navigations so we should get the game key for fire a press of
>>>> the wheel and we should get left/right/up/down on moving that wheel.
>>>> See my explanation for a similar issue in the iden devices:
>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>> essentially you can derive Form and see that the proper key events are
>>>> delivered and what is the key code.
>>>>
>>>> Thanks,
>>>> Shai.
>>>>
>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>>>> I've got the Blackberry emulator working on NetBeans. So far so good.
>>>> However, I have two issues:
>>>>
>>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>>> down on buttons. Any suggestions here would be appreciated.
>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>> find a way to type anything into the text area.
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Bill Snyder

I used isFocusPainted() (or something like that), but that seems like a hack
:)

On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
wrote:

> So does anyone know how to actually active "fire" the component? If the
> component supports command like a button, I can just activate the command,
> but how do you do it otherwise? TextArea doesn't have support for commands
> and the following code:
>
> public boolean trackwheelClick(int status, int time) {
> Display d = Display.getInstance();
>
> d.callSerially(new Runnable() {
> public void run() {
> Display d = Display.getInstance();
> Form f = d.getCurrent();
>
> if (f != null) {
> Component c = f.getFocused();
>
> if (c != null) {
> c.fireClicked();
> return true;
> }
> }
> }
> });
>
> return false;
> }
>
> I believe would work if it weren't for the fact fireClicked() is protected
>
>
> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
> wrote:
>
>> OK, so the key thing doesn't work but it turns out on the BlackBerry that
>> in a midlet application, the UIApplication objects, is not null, so we can
>> actually register a TrackwheelListener directly from the midlet.
>>
>> From there, since this is only day 2 of LWUIT, I have no idea how to get
>> this event to the currently focused LWUIT control itself but we do get
>> notifications at least.
>>
>>
>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>> wrote:
>>
>>> Looks like I spoke too soon. Following this technique, I've got the Sun
>>> CLDC emulator that ships with NetBeans working but following the same trick
>>> on the BB doesn't work.
>>>
>>> Any other suggestions?
>>>
>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>>> wrote:
>>>
>>>> Works like a charm, thank you very much.
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>>>>
>>>>> Hi Patrick,
>>>>> good to hear you are making progress ;-)
>>>>>
>>>>> The text area opens on the game "FIRE" key press. We use the game keys
>>>>> for all such navigations so we should get the game key for fire a press of
>>>>> the wheel and we should get left/right/up/down on moving that wheel.
>>>>> See my explanation for a similar issue in the iden devices:
>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>> essentially you can derive Form and see that the proper key events are
>>>>> delivered and what is the key code.
>>>>>
>>>>> Thanks,
>>>>> Shai.
>>>>>
>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>>>>> I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>> However, I have two issues:
>>>>>
>>>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>>>> down on buttons. Any suggestions here would be appreciated.
>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>> find a way to type anything into the text area.
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
[att1.html]

Patrick Julien

I'm not sure what you're saying here, this doesn't actually do anything to
the focus of the control. What I'm trying to do is activate the text area
so that the user can start typing. The method "fireClicked" seems perfect
for the job but is unfortunately protected.

On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder wrote:

> I used isFocusPainted() (or something like that), but that seems like a
> hack :)
>
>
> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
> wrote:
>
>> So does anyone know how to actually active "fire" the component? If the
>> component supports command like a button, I can just activate the command,
>> but how do you do it otherwise? TextArea doesn't have support for commands
>> and the following code:
>>
>> public boolean trackwheelClick(int status, int time) {
>> Display d = Display.getInstance();
>>
>> d.callSerially(new Runnable() {
>> public void run() {
>> Display d = Display.getInstance();
>> Form f = d.getCurrent();
>>
>> if (f != null) {
>> Component c = f.getFocused();
>>
>> if (c != null) {
>> c.fireClicked();
>> return true;
>> }
>> }
>> }
>> });
>>
>> return false;
>> }
>>
>> I believe would work if it weren't for the fact fireClicked() is protected
>>
>>
>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
>> wrote:
>>
>>> OK, so the key thing doesn't work but it turns out on the BlackBerry that
>>> in a midlet application, the UIApplication objects, is not null, so we can
>>> actually register a TrackwheelListener directly from the midlet.
>>>
>>> From there, since this is only day 2 of LWUIT, I have no idea how to get
>>> this event to the currently focused LWUIT control itself but we do get
>>> notifications at least.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>>> wrote:
>>>
>>>> Looks like I spoke too soon. Following this technique, I've got the Sun
>>>> CLDC emulator that ships with NetBeans working but following the same trick
>>>> on the BB doesn't work.
>>>>
>>>> Any other suggestions?
>>>>
>>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>>>> wrote:
>>>>
>>>>> Works like a charm, thank you very much.
>>>>>
>>>>>
>>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>>>>> wrote:
>>>>>
>>>>>> Hi Patrick,
>>>>>> good to hear you are making progress ;-)
>>>>>>
>>>>>> The text area opens on the game "FIRE" key press. We use the game keys
>>>>>> for all such navigations so we should get the game key for fire a press of
>>>>>> the wheel and we should get left/right/up/down on moving that wheel.
>>>>>> See my explanation for a similar issue in the iden devices:
>>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>>> essentially you can derive Form and see that the proper key events are
>>>>>> delivered and what is the key code.
>>>>>>
>>>>>> Thanks,
>>>>>> Shai.
>>>>>>
>>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve)
>>>>>> and I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>>> However, I have two issues:
>>>>>>
>>>>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>>>>> down on buttons. Any suggestions here would be appreciated.
>>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>>> find a way to type anything into the text area.
>>>>>>
>>>>>> --
>>>>>> http://www.spectrumdt.com
>>>>>> http://codepimps.org
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Bill Snyder

OK, gotcha. I was meaning I used isFocusPainted, say on a Button, to
determine whether or not a control had focus, and thus whether to fire the
action/command.
Not quite the answer to you question.

I too would like access to the fireClicked, and so forth.

On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
wrote:

> I'm not sure what you're saying here, this doesn't actually do anything to
> the focus of the control. What I'm trying to do is activate the text area
> so that the user can start typing. The method "fireClicked" seems perfect
> for the job but is unfortunately protected.
>
>
> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder wrote:
>
>> I used isFocusPainted() (or something like that), but that seems like a
>> hack :)
>>
>>
>> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
>> wrote:
>>
>>> So does anyone know how to actually active "fire" the component? If the
>>> component supports command like a button, I can just activate the command,
>>> but how do you do it otherwise? TextArea doesn't have support for commands
>>> and the following code:
>>>
>>> public boolean trackwheelClick(int status, int time) {
>>> Display d = Display.getInstance();
>>>
>>> d.callSerially(new Runnable() {
>>> public void run() {
>>> Display d = Display.getInstance();
>>> Form f = d.getCurrent();
>>>
>>> if (f != null) {
>>> Component c = f.getFocused();
>>>
>>> if (c != null) {
>>> c.fireClicked();
>>> return true;
>>> }
>>> }
>>> }
>>> });
>>>
>>> return false;
>>> }
>>>
>>> I believe would work if it weren't for the fact fireClicked() is
>>> protected
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
>>> wrote:
>>>
>>>> OK, so the key thing doesn't work but it turns out on the BlackBerry
>>>> that in a midlet application, the UIApplication objects, is not null, so we
>>>> can actually register a TrackwheelListener directly from the midlet.
>>>>
>>>> From there, since this is only day 2 of LWUIT, I have no idea how to get
>>>> this event to the currently focused LWUIT control itself but we do get
>>>> notifications at least.
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>>>> wrote:
>>>>
>>>>> Looks like I spoke too soon. Following this technique, I've got the
>>>>> Sun CLDC emulator that ships with NetBeans working but following the same
>>>>> trick on the BB doesn't work.
>>>>>
>>>>> Any other suggestions?
>>>>>
>>>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien <
>>>>> pjulien@spectrumdt.com> wrote:
>>>>>
>>>>>> Works like a charm, thank you very much.
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Patrick,
>>>>>>> good to hear you are making progress ;-)
>>>>>>>
>>>>>>> The text area opens on the game "FIRE" key press. We use the game
>>>>>>> keys for all such navigations so we should get the game key for fire a press
>>>>>>> of the wheel and we should get left/right/up/down on moving that wheel.
>>>>>>> See my explanation for a similar issue in the iden devices:
>>>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>>>> essentially you can derive Form and see that the proper key events
>>>>>>> are delivered and what is the key code.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Shai.
>>>>>>>
>>>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve)
>>>>>>> and I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>>>> However, I have two issues:
>>>>>>>
>>>>>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>>>>>> down on buttons. Any suggestions here would be appreciated.
>>>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>>>> find a way to type anything into the text area.
>>>>>>>
>>>>>>> --
>>>>>>> http://www.spectrumdt.com
>>>>>>> http://codepimps.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> http://www.spectrumdt.com
>>>>>> http://codepimps.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
[att1.html]

Patrick Julien

Either that or soft key remapping that works on the BB. I still don't get
why we can't remap the soft key. I've done it on two other types of
emulators and it works just fine. On the BB, even if I bind the code
correctly, fireClicked is never triggered.

TrackwheelListener works but there doesn't seem to be a method I can call to
activate the component.

On Thu, Jul 10, 2008 at 12:08 PM, Bill Snyder wrote:

> OK, gotcha. I was meaning I used isFocusPainted, say on a Button, to
> determine whether or not a control had focus, and thus whether to fire the
> action/command.
> Not quite the answer to you question.
>
> I too would like access to the fireClicked, and so forth.
>
>
> On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
> wrote:
>
>> I'm not sure what you're saying here, this doesn't actually do anything to
>> the focus of the control. What I'm trying to do is activate the text area
>> so that the user can start typing. The method "fireClicked" seems perfect
>> for the job but is unfortunately protected.
>>
>>
>> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder wrote:
>>
>>> I used isFocusPainted() (or something like that), but that seems like a
>>> hack :)
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
>>> wrote:
>>>
>>>> So does anyone know how to actually active "fire" the component? If the
>>>> component supports command like a button, I can just activate the command,
>>>> but how do you do it otherwise? TextArea doesn't have support for commands
>>>> and the following code:
>>>>
>>>> public boolean trackwheelClick(int status, int time) {
>>>> Display d = Display.getInstance();
>>>>
>>>> d.callSerially(new Runnable() {
>>>> public void run() {
>>>> Display d = Display.getInstance();
>>>> Form f = d.getCurrent();
>>>>
>>>> if (f != null) {
>>>> Component c = f.getFocused();
>>>>
>>>> if (c != null) {
>>>> c.fireClicked();
>>>> return true;
>>>> }
>>>> }
>>>> }
>>>> });
>>>>
>>>> return false;
>>>> }
>>>>
>>>> I believe would work if it weren't for the fact fireClicked() is
>>>> protected
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien <
>>>> pjulien@spectrumdt.com> wrote:
>>>>
>>>>> OK, so the key thing doesn't work but it turns out on the BlackBerry
>>>>> that in a midlet application, the UIApplication objects, is not null, so we
>>>>> can actually register a TrackwheelListener directly from the midlet.
>>>>>
>>>>> From there, since this is only day 2 of LWUIT, I have no idea how to
>>>>> get this event to the currently focused LWUIT control itself but we do get
>>>>> notifications at least.
>>>>>
>>>>>
>>>>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien <
>>>>> pjulien@spectrumdt.com> wrote:
>>>>>
>>>>>> Looks like I spoke too soon. Following this technique, I've got the
>>>>>> Sun CLDC emulator that ships with NetBeans working but following the same
>>>>>> trick on the BB doesn't work.
>>>>>>
>>>>>> Any other suggestions?
>>>>>>
>>>>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien <
>>>>>> pjulien@spectrumdt.com> wrote:
>>>>>>
>>>>>>> Works like a charm, thank you very much.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Patrick,
>>>>>>>> good to hear you are making progress ;-)
>>>>>>>>
>>>>>>>> The text area opens on the game "FIRE" key press. We use the game
>>>>>>>> keys for all such navigations so we should get the game key for fire a press
>>>>>>>> of the wheel and we should get left/right/up/down on moving that wheel.
>>>>>>>> See my explanation for a similar issue in the iden devices:
>>>>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>>>>> essentially you can derive Form and see that the proper key events
>>>>>>>> are delivered and what is the key code.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Shai.
>>>>>>>>
>>>>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve)
>>>>>>>> and I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>>>>> However, I have two issues:
>>>>>>>>
>>>>>>>> 1. I can't seem to be able to respond to the thumb wheel being
>>>>>>>> pushed down on buttons. Any suggestions here would be appreciated.
>>>>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>>>>> find a way to type anything into the text area.
>>>>>>>>
>>>>>>>> --
>>>>>>>> http://www.spectrumdt.com
>>>>>>>> http://codepimps.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> http://www.spectrumdt.com
>>>>>>> http://codepimps.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> http://www.spectrumdt.com
>>>>>> http://codepimps.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Shai Almog

Clicking is not a softbutton its a game action if game events aren't
delivered properly you can just do:
Form f = Display.getInstance().getCurrent();
f.keyPressed(Display.GAME_FIRE);
f.keyReleased(Display.GAME_FIRE);

Hope that helps,
Shai.

> Either that or soft key remapping that works on the BB. I still
> don't get why we can't remap the soft key. I've done it on two
> other types of emulators and it works just fine. On the BB, even
> if I bind the code correctly, fireClicked is never triggered.
>
> TrackwheelListener works but there doesn't seem to be a method I
> can call to activate the component.
>
> On Thu, Jul 10, 2008 at 12:08 PM, Bill Snyder
> wrote:
> OK, gotcha. I was meaning I used isFocusPainted, say on a Button,
> to determine whether or not a control had focus, and thus whether
> to fire the action/command.
> Not quite the answer to you question.
>
> I too would like access to the fireClicked, and so forth.
>
>
> On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
>
wrote:
> I'm not sure what you're saying here, this doesn't actually do
> anything to the focus of the control. What I'm trying to do is
> activate the text area so that the user can start typing. The
> method "fireClicked" seems perfect for the job but is unfortunately
> protected.
>
>
> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder
> wrote:
> I used isFocusPainted() (or something like that), but that seems
> like a hack :)
>
>
> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
>
wrote:
> So does anyone know how to actually active "fire" the component?
> If the component supports command like a button, I can just
> activate the command, but how do you do it otherwise? TextArea
> doesn't have support for commands and the following code:
>
> public boolean trackwheelClick(int status, int time) {
> Display d = Display.getInstance();
>
> d.callSerially(new Runnable() {
> public void run() {
> Display d = Display.getInstance();
> Form f = d.getCurrent();
>
> if (f != null) {
> Component c = f.getFocused();
>
> if (c != null) {
> c.fireClicked();
> return true;
> }
> }
> }
> });
>
> return false;
> }
>
> I believe would work if it weren't for the fact fireClicked() is
> protected
>
>
> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
>
wrote:
> OK, so the key thing doesn't work but it turns out on the
> BlackBerry that in a midlet application, the UIApplication objects,
> is not null, so we can actually register a TrackwheelListener
> directly from the midlet.
>
> From there, since this is only day 2 of LWUIT, I have no idea how
> to get this event to the currently focused LWUIT control itself but
> we do get notifications at least.
>
>
> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>
wrote:
> Looks like I spoke too soon. Following this technique, I've got
> the Sun CLDC emulator that ships with NetBeans working but
> following the same trick on the BB doesn't work.
>
> Any other suggestions?
>
> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>
wrote:
> Works like a charm, thank you very much.
>
>
> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
> wrote:
> Hi Patrick,
> good to hear you are making progress ;-)
>
> The text area opens on the game "FIRE" key press. We use the game
> keys for all such navigations so we should get the game key for
> fire a press of the wheel and we should get left/right/up/down on
> moving that wheel.
> See my explanation for a similar issue in the iden devices: http://
> forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
> essentially you can derive Form and see that the proper key events
> are delivered and what is the key code.
>
> Thanks,
> Shai.
>
>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and
>> Curve) and I've got the Blackberry emulator working on NetBeans.
>> So far so good. However, I have two issues:
>>
>> 1. I can't seem to be able to respond to the thumb wheel being
>> pushed down on buttons. Any suggestions here would be appreciated.
>> 2. I can't seem to be able to type anything into a text area.
>> I've created another project using LWUIT directly on Sun's
>> emulator and I can't find a way to type anything into the text area.
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

[att1.html]

Patrick Julien

It still doesn't work I'm afraid. I get the exact same result. What's
interesting, is that the form receives a key of value -8. Exactly the same
behavior when I was attempting the original proposed solution.

On Thu, Jul 10, 2008 at 1:32 PM, Shai Almog wrote:

> Clicking is not a softbutton its a game action if game events aren't
> delivered properly you can just do:
> Form f = Display.getInstance().getCurrent();
> f.keyPressed(Display.GAME_FIRE);
> f.keyReleased(Display.GAME_FIRE);
>
> Hope that helps,
> Shai.
>
> Either that or soft key remapping that works on the BB. I still don't get
> why we can't remap the soft key. I've done it on two other types of
> emulators and it works just fine. On the BB, even if I bind the code
> correctly, fireClicked is never triggered.
>
> TrackwheelListener works but there doesn't seem to be a method I can call
> to activate the component.
>
> On Thu, Jul 10, 2008 at 12:08 PM, Bill Snyder wrote:
>
>> OK, gotcha. I was meaning I used isFocusPainted, say on a Button, to
>> determine whether or not a control had focus, and thus whether to fire the
>> action/command.
>> Not quite the answer to you question.
>>
>> I too would like access to the fireClicked, and so forth.
>>
>>
>> On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
>> wrote:
>>
>>> I'm not sure what you're saying here, this doesn't actually do anything
>>> to the focus of the control. What I'm trying to do is activate the text
>>> area so that the user can start typing. The method "fireClicked" seems
>>> perfect for the job but is unfortunately protected.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder
>>> wrote:
>>>
>>>> I used isFocusPainted() (or something like that), but that seems like a
>>>> hack :)
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien <
>>>> pjulien@spectrumdt.com> wrote:
>>>>
>>>>> So does anyone know how to actually active "fire" the component? If
>>>>> the component supports command like a button, I can just activate the
>>>>> command, but how do you do it otherwise? TextArea doesn't have support for
>>>>> commands and the following code:
>>>>>
>>>>> public boolean trackwheelClick(int status, int time) {
>>>>> Display d = Display.getInstance();
>>>>>
>>>>> d.callSerially(new Runnable() {
>>>>> public void run() {
>>>>> Display d = Display.getInstance();
>>>>> Form f = d.getCurrent();
>>>>>
>>>>> if (f != null) {
>>>>> Component c = f.getFocused();
>>>>>
>>>>> if (c != null) {
>>>>> c.fireClicked();
>>>>> return true;
>>>>> }
>>>>> }
>>>>> }
>>>>> });
>>>>>
>>>>> return false;
>>>>> }
>>>>>
>>>>> I believe would work if it weren't for the fact fireClicked() is
>>>>> protected
>>>>>
>>>>>
>>>>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien <
>>>>> pjulien@spectrumdt.com> wrote:
>>>>>
>>>>>> OK, so the key thing doesn't work but it turns out on the BlackBerry
>>>>>> that in a midlet application, the UIApplication objects, is not null, so we
>>>>>> can actually register a TrackwheelListener directly from the midlet.
>>>>>>
>>>>>> From there, since this is only day 2 of LWUIT, I have no idea how to
>>>>>> get this event to the currently focused LWUIT control itself but we do get
>>>>>> notifications at least.
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien <
>>>>>> pjulien@spectrumdt.com> wrote:
>>>>>>
>>>>>>> Looks like I spoke too soon. Following this technique, I've got the
>>>>>>> Sun CLDC emulator that ships with NetBeans working but following the same
>>>>>>> trick on the BB doesn't work.
>>>>>>>
>>>>>>> Any other suggestions?
>>>>>>>
>>>>>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien <
>>>>>>> pjulien@spectrumdt.com> wrote:
>>>>>>>
>>>>>>>> Works like a charm, thank you very much.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi Patrick,
>>>>>>>>> good to hear you are making progress ;-)
>>>>>>>>>
>>>>>>>>> The text area opens on the game "FIRE" key press. We use the game
>>>>>>>>> keys for all such navigations so we should get the game key for fire a press
>>>>>>>>> of the wheel and we should get left/right/up/down on moving that wheel.
>>>>>>>>> See my explanation for a similar issue in the iden devices:
>>>>>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>>>>>> essentially you can derive Form and see that the proper key events
>>>>>>>>> are delivered and what is the key code.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Shai.
>>>>>>>>>
>>>>>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve)
>>>>>>>>> and I've got the Blackberry emulator working on NetBeans. So far so good.
>>>>>>>>> However, I have two issues:
>>>>>>>>>
>>>>>>>>> 1. I can't seem to be able to respond to the thumb wheel being
>>>>>>>>> pushed down on buttons. Any suggestions here would be appreciated.
>>>>>>>>> 2. I can't seem to be able to type anything into a text area. I've
>>>>>>>>> created another project using LWUIT directly on Sun's emulator and I can't
>>>>>>>>> find a way to type anything into the text area.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> http://www.spectrumdt.com
>>>>>>>>> http://codepimps.org
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> http://www.spectrumdt.com
>>>>>>>> http://codepimps.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> http://www.spectrumdt.com
>>>>>>> http://codepimps.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> http://www.spectrumdt.com
>>>>>> http://codepimps.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> http://www.spectrumdt.com
>>>>> http://codepimps.org
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>
>>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Shai Almog

My bad sorry:
try this:
int code = Display.getInstance().getKeyCode(Display.GAME_FIRE);
f.keyPressed(code);
f.keyReleased(code);

> It still doesn't work I'm afraid. I get the exact same result.
> What's interesting, is that the form receives a key of value -8.
> Exactly the same behavior when I was attempting the original
> proposed solution.
>
> On Thu, Jul 10, 2008 at 1:32 PM, Shai Almog
> wrote:
> Clicking is not a softbutton its a game action if game events
> aren't delivered properly you can just do:
> Form f = Display.getInstance().getCurrent();
> f.keyPressed(Display.GAME_FIRE);
> f.keyReleased(Display.GAME_FIRE);
>
> Hope that helps,
> Shai.
>
>> Either that or soft key remapping that works on the BB. I still
>> don't get why we can't remap the soft key. I've done it on two
>> other types of emulators and it works just fine. On the BB, even
>> if I bind the code correctly, fireClicked is never triggered.
>>
>> TrackwheelListener works but there doesn't seem to be a method I
>> can call to activate the component.
>>
>> On Thu, Jul 10, 2008 at 12:08 PM, Bill Snyder
>> wrote:
>> OK, gotcha. I was meaning I used isFocusPainted, say on a Button,
>> to determine whether or not a control had focus, and thus whether
>> to fire the action/command.
>> Not quite the answer to you question.
>>
>> I too would like access to the fireClicked, and so forth.
>>
>>
>> On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
>>
wrote:
>> I'm not sure what you're saying here, this doesn't actually do
>> anything to the focus of the control. What I'm trying to do is
>> activate the text area so that the user can start typing. The
>> method "fireClicked" seems perfect for the job but is
>> unfortunately protected.
>>
>>
>> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder
>> wrote:
>> I used isFocusPainted() (or something like that), but that seems
>> like a hack :)
>>
>>
>> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
>>
wrote:
>> So does anyone know how to actually active "fire" the component?
>> If the component supports command like a button, I can just
>> activate the command, but how do you do it otherwise? TextArea
>> doesn't have support for commands and the following code:
>>
>> public boolean trackwheelClick(int status, int time) {
>> Display d = Display.getInstance();
>>
>> d.callSerially(new Runnable() {
>> public void run() {
>> Display d = Display.getInstance();
>> Form f = d.getCurrent();
>>
>> if (f != null) {
>> Component c = f.getFocused();
>>
>> if (c != null) {
>> c.fireClicked();
>> return true;
>> }
>> }
>> }
>> });
>>
>> return false;
>> }
>>
>> I believe would work if it weren't for the fact fireClicked() is
>> protected
>>
>>
>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
>>
wrote:
>> OK, so the key thing doesn't work but it turns out on the
>> BlackBerry that in a midlet application, the UIApplication
>> objects, is not null, so we can actually register a
>> TrackwheelListener directly from the midlet.
>>
>> From there, since this is only day 2 of LWUIT, I have no idea how
>> to get this event to the currently focused LWUIT control itself
>> but we do get notifications at least.
>>
>>
>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>>
wrote:
>> Looks like I spoke too soon. Following this technique, I've got
>> the Sun CLDC emulator that ships with NetBeans working but
>> following the same trick on the BB doesn't work.
>>
>> Any other suggestions?
>>
>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>>
wrote:
>> Works like a charm, thank you very much.
>>
>>
>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>> wrote:
>> Hi Patrick,
>> good to hear you are making progress ;-)
>>
>> The text area opens on the game "FIRE" key press. We use the game
>> keys for all such navigations so we should get the game key for
>> fire a press of the wheel and we should get left/right/up/down on
>> moving that wheel.
>> See my explanation for a similar issue in the iden devices: http://
>> forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>> essentially you can derive Form and see that the proper key events
>> are delivered and what is the key code.
>>
>> Thanks,
>> Shai.
>>
>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and
>>> Curve) and I've got the Blackberry emulator working on NetBeans.
>>> So far so good. However, I have two issues:
>>>
>>> 1. I can't seem to be able to respond to the thumb wheel being
>>> pushed down on buttons. Any suggestions here would be appreciated.
>>> 2. I can't seem to be able to type anything into a text area.
>>> I've created another project using LWUIT directly on Sun's
>>> emulator and I can't find a way to type anything into the text area.
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

[att1.html]

Patrick Julien

It now works for a text area but still doesn't work for a button.

This is what I did to get it working for all widgets, and no, it's not very
pretty. I defined an interface FireClickedAccessor. Then I inherited a
class from TextArea and Button respectively called TextAreaAccessorAdapter
and ButtonAccessorAdapter.

In those classes, I implemented all the inherited constructors and the
single interface method defined by FireClickedAccessor. This single method
just calls the protected member "fireClicked"

Then from the TrackwheelListener, I execute an action via
Display.callSerially() that does the following

public void run() {
Display d = Display.getInstance();
Form f = d.getCurrent();

if (f != null) {
Component c = f.getFocused();

if (c != null && c instanceof FireClickedAccessor) {
FireClickedAccessor a = (FireClickedAccessor) c;

a.performFireClicked();
}
}
}

And this works for everything now. It's incredibly ugly and I don't like it
but I don't get paid for pretty. I would advocate making fireClicked()
public in the next drop.

On Thu, Jul 10, 2008 at 1:59 PM, Shai Almog wrote:

> My bad sorry:
> try this:
> int code = Display.getInstance().getKeyCode(Display.GAME_FIRE);
> f.keyPressed(code);
> f.keyReleased(code);
>
> It still doesn't work I'm afraid. I get the exact same result. What's
> interesting, is that the form receives a key of value -8. Exactly the same
> behavior when I was attempting the original proposed solution.
>
> On Thu, Jul 10, 2008 at 1:32 PM, Shai Almog wrote:
>
>> Clicking is not a softbutton its a game action if game events aren't
>> delivered properly you can just do:
>> Form f = Display.getInstance().getCurrent();
>> f.keyPressed(Display.GAME_FIRE);
>> f.keyReleased(Display.GAME_FIRE);
>>
>> Hope that helps,
>> Shai.
>>
>> Either that or soft key remapping that works on the BB. I still don't get
>> why we can't remap the soft key. I've done it on two other types of
>> emulators and it works just fine. On the BB, even if I bind the code
>> correctly, fireClicked is never triggered.
>>
>> TrackwheelListener works but there doesn't seem to be a method I can call
>> to activate the component.
>>
>> On Thu, Jul 10, 2008 at 12:08 PM, Bill Snyder wrote:
>>
>>> OK, gotcha. I was meaning I used isFocusPainted, say on a Button, to
>>> determine whether or not a control had focus, and thus whether to fire the
>>> action/command.
>>> Not quite the answer to you question.
>>>
>>> I too would like access to the fireClicked, and so forth.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
>>> wrote:
>>>
>>>> I'm not sure what you're saying here, this doesn't actually do anything
>>>> to the focus of the control. What I'm trying to do is activate the text
>>>> area so that the user can start typing. The method "fireClicked" seems
>>>> perfect for the job but is unfortunately protected.
>>>>
>>>>
>>>> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder
>>>> wrote:
>>>>
>>>>> I used isFocusPainted() (or something like that), but that seems like a
>>>>> hack :)
>>>>>
>>>>>
>>>>> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien <
>>>>> pjulien@spectrumdt.com> wrote:
>>>>>
>>>>>> So does anyone know how to actually active "fire" the component? If
>>>>>> the component supports command like a button, I can just activate the
>>>>>> command, but how do you do it otherwise? TextArea doesn't have support for
>>>>>> commands and the following code:
>>>>>>
>>>>>> public boolean trackwheelClick(int status, int time) {
>>>>>> Display d = Display.getInstance();
>>>>>>
>>>>>> d.callSerially(new Runnable() {
>>>>>> public void run() {
>>>>>> Display d = Display.getInstance();
>>>>>> Form f = d.getCurrent();
>>>>>>
>>>>>> if (f != null) {
>>>>>> Component c = f.getFocused();
>>>>>>
>>>>>> if (c != null) {
>>>>>> c.fireClicked();
>>>>>> return true;
>>>>>> }
>>>>>> }
>>>>>> }
>>>>>> });
>>>>>>
>>>>>> return false;
>>>>>> }
>>>>>>
>>>>>> I believe would work if it weren't for the fact fireClicked() is
>>>>>> protected
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien <
>>>>>> pjulien@spectrumdt.com> wrote:
>>>>>>
>>>>>>> OK, so the key thing doesn't work but it turns out on the BlackBerry
>>>>>>> that in a midlet application, the UIApplication objects, is not null, so we
>>>>>>> can actually register a TrackwheelListener directly from the midlet.
>>>>>>>
>>>>>>> From there, since this is only day 2 of LWUIT, I have no idea how to
>>>>>>> get this event to the currently focused LWUIT control itself but we do get
>>>>>>> notifications at least.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien <
>>>>>>> pjulien@spectrumdt.com> wrote:
>>>>>>>
>>>>>>>> Looks like I spoke too soon. Following this technique, I've got the
>>>>>>>> Sun CLDC emulator that ships with NetBeans working but following the same
>>>>>>>> trick on the BB doesn't work.
>>>>>>>>
>>>>>>>> Any other suggestions?
>>>>>>>>
>>>>>>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien <
>>>>>>>> pjulien@spectrumdt.com> wrote:
>>>>>>>>
>>>>>>>>> Works like a charm, thank you very much.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Patrick,
>>>>>>>>>> good to hear you are making progress ;-)
>>>>>>>>>>
>>>>>>>>>> The text area opens on the game "FIRE" key press. We use the game
>>>>>>>>>> keys for all such navigations so we should get the game key for fire a press
>>>>>>>>>> of the wheel and we should get left/right/up/down on moving that wheel.
>>>>>>>>>> See my explanation for a similar issue in the iden devices:
>>>>>>>>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>>>>>>>>> essentially you can derive Form and see that the proper key events
>>>>>>>>>> are delivered and what is the key code.
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Shai.
>>>>>>>>>>
>>>>>>>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and
>>>>>>>>>> Curve) and I've got the Blackberry emulator working on NetBeans. So far so
>>>>>>>>>> good. However, I have two issues:
>>>>>>>>>>
>>>>>>>>>> 1. I can't seem to be able to respond to the thumb wheel being
>>>>>>>>>> pushed down on buttons. Any suggestions here would be appreciated.
>>>>>>>>>> 2. I can't seem to be able to type anything into a text area.
>>>>>>>>>> I've created another project using LWUIT directly on Sun's emulator and I
>>>>>>>>>> can't find a way to type anything into the text area.
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> http://www.spectrumdt.com
>>>>>>>>>> http://codepimps.org
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> http://www.spectrumdt.com
>>>>>>>>> http://codepimps.org
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> http://www.spectrumdt.com
>>>>>>>> http://codepimps.org
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> http://www.spectrumdt.com
>>>>>>> http://codepimps.org
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> http://www.spectrumdt.com
>>>>>> http://codepimps.org
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>>
>>>
>>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Shai Almog

Can we go back a second to square one?
If you implement a canvas/game canvas in the BB and press/move the
trackwheel won't it trigger a MIDP keyPressed/keyReleased like in the
simulator?

I just have no idea why this isn't working for you?

> It now works for a text area but still doesn't work for a button.
>
> This is what I did to get it working for all widgets, and no, it's
> not very pretty. I defined an interface FireClickedAccessor. Then
> I inherited a class from TextArea and Button respectively called
> TextAreaAccessorAdapter and ButtonAccessorAdapter.
>
> In those classes, I implemented all the inherited constructors and
> the single interface method defined by FireClickedAccessor. This
> single method just calls the protected member "fireClicked"
>
> Then from the TrackwheelListener, I execute an action via
> Display.callSerially() that does the following
>
> public void run() {
> Display d = Display.getInstance();
> Form f = d.getCurrent();
>
> if (f != null) {
> Component c = f.getFocused();
>
> if (c != null && c instanceof FireClickedAccessor) {
> FireClickedAccessor a = (FireClickedAccessor) c;
>
> a.performFireClicked();
> }
> }
> }
>
> And this works for everything now. It's incredibly ugly and I
> don't like it but I don't get paid for pretty. I would advocate
> making fireClicked() public in the next drop.
>
> On Thu, Jul 10, 2008 at 1:59 PM, Shai Almog
> wrote:
> My bad sorry:
> try this:
> int code = Display.getInstance().getKeyCode(Display.GAME_FIRE);
> f.keyPressed(code);
> f.keyReleased(code);
>
>> It still doesn't work I'm afraid. I get the exact same result.
>> What's interesting, is that the form receives a key of value -8.
>> Exactly the same behavior when I was attempting the original
>> proposed solution.
>>
>> On Thu, Jul 10, 2008 at 1:32 PM, Shai Almog
>> wrote:
>> Clicking is not a softbutton its a game action if game events
>> aren't delivered properly you can just do:
>> Form f = Display.getInstance().getCurrent();
>> f.keyPressed(Display.GAME_FIRE);
>> f.keyReleased(Display.GAME_FIRE);
>>
>> Hope that helps,
>> Shai.
>>
>>> Either that or soft key remapping that works on the BB. I still
>>> don't get why we can't remap the soft key. I've done it on two
>>> other types of emulators and it works just fine. On the BB, even
>>> if I bind the code correctly, fireClicked is never triggered.
>>>
>>> TrackwheelListener works but there doesn't seem to be a method I
>>> can call to activate the component.
>>>
>>> On Thu, Jul 10, 2008 at 12:08 PM, Bill Snyder
>>> wrote:
>>> OK, gotcha. I was meaning I used isFocusPainted, say on a Button,
>>> to determine whether or not a control had focus, and thus whether
>>> to fire the action/command.
>>> Not quite the answer to you question.
>>>
>>> I too would like access to the fireClicked, and so forth.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:56 AM, Patrick Julien
>>>
wrote:
>>> I'm not sure what you're saying here, this doesn't actually do
>>> anything to the focus of the control. What I'm trying to do is
>>> activate the text area so that the user can start typing. The
>>> method "fireClicked" seems perfect for the job but is
>>> unfortunately protected.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:48 AM, Bill Snyder
>>> wrote:
>>> I used isFocusPainted() (or something like that), but that seems
>>> like a hack :)
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:37 AM, Patrick Julien
>>>
wrote:
>>> So does anyone know how to actually active "fire" the component?
>>> If the component supports command like a button, I can just
>>> activate the command, but how do you do it otherwise? TextArea
>>> doesn't have support for commands and the following code:
>>>
>>> public boolean trackwheelClick(int status, int time) {
>>> Display d = Display.getInstance();
>>>
>>> d.callSerially(new Runnable() {
>>> public void run() {
>>> Display d = Display.getInstance();
>>> Form f = d.getCurrent();
>>>
>>> if (f != null) {
>>> Component c = f.getFocused();
>>>
>>> if (c != null) {
>>> c.fireClicked();
>>> return true;
>>> }
>>> }
>>> }
>>> });
>>>
>>> return false;
>>> }
>>>
>>> I believe would work if it weren't for the fact fireClicked() is
>>> protected
>>>
>>>
>>> On Thu, Jul 10, 2008 at 11:15 AM, Patrick Julien
>>>
wrote:
>>> OK, so the key thing doesn't work but it turns out on the
>>> BlackBerry that in a midlet application, the UIApplication
>>> objects, is not null, so we can actually register a
>>> TrackwheelListener directly from the midlet.
>>>
>>> From there, since this is only day 2 of LWUIT, I have no idea how
>>> to get this event to the currently focused LWUIT control itself
>>> but we do get notifications at least.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 9:44 AM, Patrick Julien
>>>
wrote:
>>> Looks like I spoke too soon. Following this technique, I've got
>>> the Sun CLDC emulator that ships with NetBeans working but
>>> following the same trick on the BB doesn't work.
>>>
>>> Any other suggestions?
>>>
>>> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
>>>
wrote:
>>> Works like a charm, thank you very much.
>>>
>>>
>>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog
>>> wrote:
>>> Hi Patrick,
>>> good to hear you are making progress ;-)
>>>
>>> The text area opens on the game "FIRE" key press. We use the game
>>> keys for all such navigations so we should get the game key for
>>> fire a press of the wheel and we should get left/right/up/down on
>>> moving that wheel.
>>> See my explanation for a similar issue in the iden devices:
>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>> essentially you can derive Form and see that the proper key
>>> events are delivered and what is the key code.
>>>
>>> Thanks,
>>> Shai.
>>>
>>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and
>>>> Curve) and I've got the Blackberry emulator working on
>>>> NetBeans. So far so good. However, I have two issues:
>>>>
>>>> 1. I can't seem to be able to respond to the thumb wheel being
>>>> pushed down on buttons. Any suggestions here would be appreciated.
>>>> 2. I can't seem to be able to type anything into a text area.
>>>> I've created another project using LWUIT directly on Sun's
>>>> emulator and I can't find a way to type anything into the text
>>>> area.
>>>>
>>>> --
>>>> http://www.spectrumdt.com
>>>> http://codepimps.org
>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>
>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

[att1.html]

Patrick Julien

On Thu, Jul 10, 2008 at 2:22 PM, Shai Almog wrote:

> Can we go back a second to square one?
>

sure

> If you implement a canvas/game canvas in the BB and press/move the
> trackwheel won't it trigger a MIDP keyPressed/keyReleased like in the
> simulator?
>

If I do the following:

Form f = new Form() {
public void keyReleased(int key) {
super.keyReleased(key);
Dialog.show("", "Key is: " + key, "OK", null);
}
};

This does indeed get called for the BlackBerry, simulator or not. The value
of the thumb button click is -8. If I enter this value for SoftKey-Center
(or left or right) in the jad file however the action listener for the
button, or the fire on the text area, is never actually triggered.

If I use my Sprint or Sun emulators, the same procedure works perfectly. I
capture the key code and setup the soft keys in the jad file and it just
works.

>
> I just have no idea why this isn't working for you?
>

Well, I can get the key code, and I can get it to work on other type of
phones, just not the BlackBerry.

The following:

int code = Display.getInstance().getKeyCode(Display.GAME_FIRE);
f.keyPressed(code);
f.keyReleased(code);

works for a text area but doesn't for a button.
[att1.html]

Shai Almog

What's a thumb button?
Its the center wheel, right?

That should be the FIRE action NOT a softbutton!
Softbuttons in the BB are mapped to the 'Q', 'P' and 'O' keys on the
keyboard similarly to opera mobile.

The fire key should work for general application navigation together
with the wheel for scrolling.

Shai.

>
>
> On Thu, Jul 10, 2008 at 2:22 PM, Shai Almog
> wrote:
> Can we go back a second to square one?
>
> sure
>
> If you implement a canvas/game canvas in the BB and press/move the
> trackwheel won't it trigger a MIDP keyPressed/keyReleased like in
> the simulator?
>
> If I do the following:
>
> Form f = new Form() {
> public void keyReleased(int key) {
> super.keyReleased(key);
> Dialog.show("", "Key is: " + key, "OK", null);
> }
> };
>
> This does indeed get called for the BlackBerry, simulator or not.
> The value of the thumb button click is -8. If I enter this value
> for SoftKey-Center (or left or right) in the jad file however the
> action listener for the button, or the fire on the text area, is
> never actually triggered.
>
> If I use my Sprint or Sun emulators, the same procedure works
> perfectly. I capture the key code and setup the soft keys in the
> jad file and it just works.
>
>
> I just have no idea why this isn't working for you?
>
> Well, I can get the key code, and I can get it to work on other
> type of phones, just not the BlackBerry.
>
> The following:
>
> int code = Display.getInstance().getKeyCode(Display.GAME_FIRE);
> f.keyPressed(code);
> f.keyReleased(code);
>
> works for a text area but doesn't for a button.

[att1.html]

Patrick Julien

On Thu, Jul 10, 2008 at 2:41 PM, Shai Almog wrote:

> What's a thumb button?
> Its the center wheel, right?
>

yes

>
> That should be the FIRE action NOT a softbutton!
>

It is

> Softbuttons in the BB are mapped to the 'Q', 'P' and 'O' keys on the
> keyboard similarly to opera mobile.
>
> The fire key should work for general application navigation together with
> the wheel for scrolling.
>

OK, so what do I put in the jad file for a fire then? Because it just
doesn't work otherwise. If I want to fire up a text area or a button, a BB
user is going to be expecting to do this with the wheel.

So again, I'm not clear on what you're saying here, what is the
recommendation?
[att1.html]

Shai Almog

> OK, so what do I put in the jad file for a fire then? Because it
> just doesn't work otherwise. If I want to fire up a text area or a
> button, a BB user is going to be expecting to do this with the wheel.
>
> So again, I'm not clear on what you're saying here, what is the
> recommendation?
>
Remove everything from the JAD file!
Use the thumb button to navigate only and use Q, P, O for softbuttons
which is the default behavior on the BB.

Does that work?

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

Patrick Julien

First, with the solution I outlined, I no longer had anything specified for
soft keys in the JAD file.
Second, if I remove my TrackwheelListener, nothing works, I cannot activate
the text area or the button using either the wheel, Q, P or O.

Finally, BlackBerry users want their wheel button to just work, they really
don't care where their soft keys are located or even what they are. Once
again, I restate my plea for fireClicked to become a public member.

On Thu, Jul 10, 2008 at 3:33 PM, Shai Almog wrote:

> OK, so what do I put in the jad file for a fire then? Because it just
>> doesn't work otherwise. If I want to fire up a text area or a button, a BB
>> user is going to be expecting to do this with the wheel.
>>
>> So again, I'm not clear on what you're saying here, what is the
>> recommendation?
>>
>> Remove everything from the JAD file!
> Use the thumb button to navigate only and use Q, P, O for softbuttons which
> is the default behavior on the BB.
>
> Does that work?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Shai Almog

The wheel should work, what I'm trying to figure out is what is
happening to the MIDP game action keys?
Anyway, I guess this might have to wait for Chen since he has the BB
experience and neither one of us has a properly working device...

> First, with the solution I outlined, I no longer had anything
> specified for soft keys in the JAD file.
> Second, if I remove my TrackwheelListener, nothing works, I cannot
> activate the text area or the button using either the wheel, Q, P
> or O.
>
> Finally, BlackBerry users want their wheel button to just work,
> they really don't care where their soft keys are located or even
> what they are. Once again, I restate my plea for fireClicked to
> become a public member.
>
> On Thu, Jul 10, 2008 at 3:33 PM, Shai Almog
> wrote:
> OK, so what do I put in the jad file for a fire then? Because it
> just doesn't work otherwise. If I want to fire up a text area or a
> button, a BB user is going to be expecting to do this with the wheel.
>
> So again, I'm not clear on what you're saying here, what is the
> recommendation?
>
> Remove everything from the JAD file!
> Use the thumb button to navigate only and use Q, P, O for
> softbuttons which is the default behavior on the BB.
>
> Does that work?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

[att1.html]

Patrick Julien

On Thu, Jul 10, 2008 at 4:03 PM, Shai Almog wrote:

> The wheel should work, what I'm trying to figure out is what is happening
> to the MIDP game action keys?
> Anyway, I guess this might have to wait for Chen since he has the BB
> experience and neither one of us has a properly working device...
>

The wheel does indeed work for navigation, just not for activation. In any
case, with the solution outlined before, I'm happily coding my app now, just
have this ugly hack in the middle of it.
[att1.html]

chenf
Offline
Joined: 2008-04-29

Hi,
I found the problem, seems like the back key collide with the BB fire key.
In the jad file declare SoftKey-Back=5000, that will solve your problems, and I'll fix it for the next drop.

Regards,
Chen

Patrick Julien

This does not work for me on the 8100 emulator. Is this the only soft key
you wanted me to define?

Pressing down on the thumb wheel does not activate either the text area or
the button in my lwuit sample.

On Sun, Jul 13, 2008 at 6:02 AM, wrote:

> Hi,
> I found the problem, seems like the back key collide with the BB fire key.
> In the jad file declare SoftKey-Back=5000, that will solve your problems,
> and I'll fix it for the next drop.
>
> Regards,
> Chen
> [Message sent by forum member 'chenf' (chenf)]
>
> http://forums.java.net/jive/thread.jspa?messageID=286235
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

chen

Hi,

Patrick Julien wrote:
> This does not work for me on the 8100 emulator. Is this the only soft
> key you wanted me to define?
yes
>
>
> Pressing down on the thumb wheel does not activate either the text
> area or the button in my lwuit sample.
Did you removed all the hacks?
This works just fine for me, I'm running the LWUIT Demo on JDE 4.3.0 and
simulator 8120.

Regards,
Chen

> On Sun, Jul 13, 2008 at 6:02 AM, > > wrote:
>
> Hi,
> I found the problem, seems like the back key collide with the BB
> fire key.
> In the jad file declare SoftKey-Back=5000, that will solve your
> problems, and I'll fix it for the next drop.
>
> Regards,
> Chen
> [Message sent by forum member 'chenf' (chenf)]
>
> http://forums.java.net/jive/thread.jspa?messageID=286235
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

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

Patrick Julien

On Sun, Jul 13, 2008 at 9:27 AM, chen wrote:

> Hi,
>
> Patrick Julien wrote:
>
>> This does not work for me on the 8100 emulator. Is this the only soft key
>> you wanted me to define?
>>
> yes
>
>>
>> Pressing down on the thumb wheel does not activate either the text area or
>> the button in my lwuit sample.
>>
> Did you removed all the hacks?
> This works just fine for me, I'm running the LWUIT Demo on JDE 4.3.0 and
> simulator 8120.
>

Yes, I removed the tree wheel listener and adapter classes.
[att1.html]

chen

That's weired,
we plan to release a drop tomorrow, could you please check again with
that version and let me know?

Thanks,
Chen

Patrick Julien wrote:
>
>
> On Sun, Jul 13, 2008 at 9:27 AM, chen > > wrote:
>
> Hi,
>
>
> Patrick Julien wrote:
>
> This does not work for me on the 8100 emulator. Is this the
> only soft key you wanted me to define?
>
> yes
>
>
> Pressing down on the thumb wheel does not activate either the
> text area or the button in my lwuit sample.
>
> Did you removed all the hacks?
> This works just fine for me, I'm running the LWUIT Demo on JDE
> 4.3.0 and simulator 8120.
>
>
> Yes, I removed the tree wheel listener and adapter classes.
>

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

Patrick Julien

Sure, I will. With the version tomorrow, do you want me to incorporate any
soft key directives in the jad file?

On Sun, Jul 13, 2008 at 1:57 PM, chen wrote:

> That's weired,
> we plan to release a drop tomorrow, could you please check again with that
> version and let me know?
>
> Thanks,
> Chen
>
> Patrick Julien wrote:
>
>
>>
>> On Sun, Jul 13, 2008 at 9:27 AM, chen >> Chen.Fishbein@sun.com>> wrote:
>>
>> Hi,
>>
>>
>> Patrick Julien wrote:
>>
>> This does not work for me on the 8100 emulator. Is this the
>> only soft key you wanted me to define?
>>
>> yes
>>
>> Pressing down on the thumb wheel does not activate either
>> the
>> text area or the button in my lwuit sample.
>>
>> Did you removed all the hacks?
>> This works just fine for me, I'm running the LWUIT Demo on JDE
>> 4.3.0 and simulator 8120.
>>
>>
>> Yes, I removed the tree wheel listener and adapter classes.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

chen

Patrick Julien wrote:
> Sure, I will.
Thanks
> With the version tomorrow, do you want me to incorporate any soft
> key directives in the jad file?
No, the new version will include a fix for that.

Thanks,
Chen

>
> On Sun, Jul 13, 2008 at 1:57 PM, chen > > wrote:
>
> That's weired,
> we plan to release a drop tomorrow, could you please check again
> with that version and let me know?
>
> Thanks,
> Chen
>
> Patrick Julien wrote:
>
>
>
> On Sun, Jul 13, 2008 at 9:27 AM, chen > > >> wrote:
>
> Hi,
>
>
> Patrick Julien wrote:
>
> This does not work for me on the 8100 emulator. Is
> this the
> only soft key you wanted me to define?
>
> yes
>
> Pressing down on the thumb wheel does not
> activate either the
> text area or the button in my lwuit sample.
>
> Did you removed all the hacks?
> This works just fine for me, I'm running the LWUIT Demo on JDE
> 4.3.0 and simulator 8120.
>
>
> Yes, I removed the tree wheel listener and adapter classes.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
>
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>
>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

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

Shai Almog

Hi Patrick,
good to hear you are making progress ;-)

The text area opens on the game "FIRE" key press. We use the game
keys for all such navigations so we should get the game key for fire
a press of the wheel and we should get left/right/up/down on moving
that wheel.
See my explanation for a similar issue in the iden devices: http://
forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
essentially you can derive Form and see that the proper key events
are delivered and what is the key code.

Thanks,
Shai.

> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve)
> and I've got the Blackberry emulator working on NetBeans. So far
> so good. However, I have two issues:
>
> 1. I can't seem to be able to respond to the thumb wheel being
> pushed down on buttons. Any suggestions here would be appreciated.
> 2. I can't seem to be able to type anything into a text area. I've
> created another project using LWUIT directly on Sun's emulator and
> I can't find a way to type anything into the text area.
>
> --
> http://www.spectrumdt.com
> http://codepimps.org

[att1.html]

Patrick Julien

Works like a charm, thank you very much.

On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:

> Hi Patrick,
> good to hear you are making progress ;-)
>
> The text area opens on the game "FIRE" key press. We use the game keys for
> all such navigations so we should get the game key for fire a press of the
> wheel and we should get left/right/up/down on moving that wheel.
> See my explanation for a similar issue in the iden devices:
> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
> essentially you can derive Form and see that the proper key events are
> delivered and what is the key code.
>
> Thanks,
> Shai.
>
> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
> I've got the Blackberry emulator working on NetBeans. So far so good.
> However, I have two issues:
>
> 1. I can't seem to be able to respond to the thumb wheel being pushed down
> on buttons. Any suggestions here would be appreciated.
> 2. I can't seem to be able to type anything into a text area. I've created
> another project using LWUIT directly on Sun's emulator and I can't find a
> way to type anything into the text area.
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]

Bill Snyder

Hey Patrick,

- did you build a separate cod for the lwuit jar or bundle it in with your
app?

--Bill

On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
wrote:

> Works like a charm, thank you very much.
>
>
> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>
>> Hi Patrick,
>> good to hear you are making progress ;-)
>>
>> The text area opens on the game "FIRE" key press. We use the game keys for
>> all such navigations so we should get the game key for fire a press of the
>> wheel and we should get left/right/up/down on moving that wheel.
>> See my explanation for a similar issue in the iden devices:
>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>> essentially you can derive Form and see that the proper key events are
>> delivered and what is the key code.
>>
>> Thanks,
>> Shai.
>>
>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>> I've got the Blackberry emulator working on NetBeans. So far so good.
>> However, I have two issues:
>>
>> 1. I can't seem to be able to respond to the thumb wheel being pushed down
>> on buttons. Any suggestions here would be appreciated.
>> 2. I can't seem to be able to type anything into a text area. I've
>> created another project using LWUIT directly on Sun's emulator and I can't
>> find a way to type anything into the text area.
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>>
>>
>
>
> --
> http://www.spectrumdt.com
> http://codepimps.org
>
[att1.html]

Patrick Julien

Bundled it with the app. I had to remove the m3g and 3d transition classes
however to get it to work. Bundling it in the cod though makes it too big
so the cod file becomes a zip file, so when you distribute it, you have to
follow the guidelines here:

http://www.handango.com/marketing/developerTeam/BlackBerryOTADeployment.pdf

On Thu, Jul 10, 2008 at 9:36 AM, Bill Snyder wrote:

> Hey Patrick,
>
> - did you build a separate cod for the lwuit jar or bundle it in with your
> app?
>
> --Bill
>
>
> On Thu, Jul 10, 2008 at 9:19 AM, Patrick Julien
> wrote:
>
>> Works like a charm, thank you very much.
>>
>>
>> On Thu, Jul 10, 2008 at 8:55 AM, Shai Almog wrote:
>>
>>> Hi Patrick,
>>> good to hear you are making progress ;-)
>>>
>>> The text area opens on the game "FIRE" key press. We use the game keys
>>> for all such navigations so we should get the game key for fire a press of
>>> the wheel and we should get left/right/up/down on moving that wheel.
>>> See my explanation for a similar issue in the iden devices:
>>> http://forums.java.net/jive/thread.jspa?threadID=43598&tstart=0
>>> essentially you can derive Form and see that the proper key events are
>>> delivered and what is the key code.
>>>
>>> Thanks,
>>> Shai.
>>>
>>> OK, so I've got LWUIT working on BlackBerry (8100, Pearl and Curve) and
>>> I've got the Blackberry emulator working on NetBeans. So far so good.
>>> However, I have two issues:
>>>
>>> 1. I can't seem to be able to respond to the thumb wheel being pushed
>>> down on buttons. Any suggestions here would be appreciated.
>>> 2. I can't seem to be able to type anything into a text area. I've
>>> created another project using LWUIT directly on Sun's emulator and I can't
>>> find a way to type anything into the text area.
>>>
>>> --
>>> http://www.spectrumdt.com
>>> http://codepimps.org
>>>
>>>
>>>
>>
>>
>> --
>> http://www.spectrumdt.com
>> http://codepimps.org
>>
>
>

--
http://www.spectrumdt.com
http://codepimps.org
[att1.html]