Skip to main content

Need Help: Trying to use JavaTV on PhoneME advanced: Events not consumed

5 replies [Last post]
schulp
Offline
Joined: 2006-01-20
Points: 0

I switched from the old PBP reference implementation to the open source Phone ME Advanced. The demo Xlet runs fine on both our own port as well as the QT version that comes with it.

But as soon I try to use JavaTV (javatv1.1_01) events are not consumed and cause stack overflow. (If I use an xlet that has a KeyListener that gets added to the RootContainer the event gets consumed somewhere, but is not delivered to the KeyListener.)

Below is the bottom of the stack from running the SvcDispXlet that's included in the samples of JavaTV. The DisplayManager always sends it back to the AWT component and this repeats itself until the stack is full:

at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
at java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V(EventQueue.java:297)
at java.awt.EventQueueProxy.dispatchEvent(Ljava/awt/AWTEvent;)V(EventDispatchThread.java:300)
at java.awt.EventDispatchThread.pumpOneEvent(I)Z(EventDispatchThread.java:112)
at java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V(EventDispatchThread.java:102)
at java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V(EventDispatchThread.java:97)
at java.awt.EventDispatchThread.run()V(EventDispatchThread.java:88)
at java.lang.Thread.startup(Z)V(Thread.java:767)

-- Schulp

Reply viewing options

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

Hi Schulp,

Do you have a small snippet or a small standalone Xlet that exhibits the
problem? If so, I can open up a bug report in IssueTracker for you and
hopefully we can find someone who can reproduce the bug using a testcase
from you and if they can fix it.

Thanks,

Hinkmond

phonemeadvanced@mobileandembedded.org wrote:
> I switched from the old PBP reference implementation to the open source Phone ME Advanced. The demo Xlet runs fine on both our own port as well as the QT version that comes with it.
>
> But as soon I try to use JavaTV (javatv1.1_01) events are not consumed and cause stack overflow. (If I use an xlet that has a KeyListener that gets added to the RootContainer the event gets consumed somewhere, but is not delivered to the KeyListener.)
>
> Below is the bottom of the stack from running the SvcDispXlet that's included in the samples of JavaTV. The DisplayManager always sends it back to the AWT component and this repeats itself until the stack is full:
>
> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
> at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
> at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
> at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
> at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
> at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
> at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
> at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
> at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
> at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
> at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
> at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
> at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
> at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
> at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
> at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
> at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
> at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
> at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
> at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
> at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
> at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at com.sun.tv.DisplayManager$MyKeyListener.passEvent(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at com.sun.tv.DisplayManager$MyKeyListener.keyTyped(Ljava/awt/event/KeyEvent;)V(Unknown Source)
> at java.awt.Component.processKeyEvent(Ljava/awt/event/KeyEvent;)V(Component.java:2948)
> at java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V(Component.java:2834)
> at java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V(Container.java:909)
> at java.awt.Window.processEvent(Ljava/awt/AWTEvent;)V(Window.java:651)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2160)
> at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at java.awt.KeyboardFocusManager.redispatchEvent(Ljava/awt/Component;Ljava/awt/AWTEvent;)V(KeyboardFocusManager.java:724)
> at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:574)
> at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Ljava/awt/event/KeyEvent;)Z(DefaultKeyboardFocusManager.java:702)
> at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Ljava/awt/Component;Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:652)
> at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Ljava/awt/AWTEvent;)Z(DefaultKeyboardFocusManager.java:557)
> at java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Component.java:2074)
> at java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V(Window.java:270)
> at java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V(Component.java:2065)
> at java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V(EventQueue.java:297)
> at java.awt.EventQueueProxy.dispatchEvent(Ljava/awt/AWTEvent;)V(EventDispatchThread.java:300)
> at java.awt.EventDispatchThread.pumpOneEvent(I)Z(EventDispatchThread.java:112)
> at java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V(EventDispatchThread.java:102)
> at java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V(EventDispatchThread.java:97)
> at java.awt.EventDispatchThread.run()V(EventDispatchThread.java:88)
> at java.lang.Thread.startup(Z)V(Thread.java:767)
>
>
> -- Schulp
> [Message sent by forum member 'schulp' (schulp)]
>
> http://forums.java.net/jive/thread.jspa?messageID=206484
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>

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

schulp
Offline
Joined: 2006-01-20
Points: 0

Hi Hinkmond,

sure, here is one: Below is a tiny Xlet that can be used to see both, the stack overflow, or if requestFocus() is enabled in line 49, that the events are not delivered to the KeyListener.

The qt version I launch from the command line as:
bin/cvm -cp /home/helmut/jtv/javatv.jar:/home/helmut/jtv/j2me_xml_cdc.jar:/home/helmut/jtv/javatv1.1_01/samples/runxlet:/home/helmut/br/mx RunXlet MiniXlet

The files for the simulator (JavaTV.properties, JavaTVSampleFile01.xml JavaTVServiceFile.dtd and JavaTVServiceFile.xml) have to be copied to ./lib.

When using the port to our graphics device it is launched differently as we have some C main that loads the CVM as a shared library, but the behavior is the same.

Thanks,

Helmut

(Sorry somehow the indentation gets lost here.)
== MiniXlet ============================================

import java.awt.*;
import java.awt.event.*;
import javax.tv.xlet.*;
import javax.tv.graphics.TVContainer;

public class MiniXlet extends Component implements javax.tv.xlet.Xlet, KeyListener
{
private javax.tv.xlet.XletContext context;
private Container container;
private boolean hasBeenStarted;

public MiniXlet(){
}

public void initXlet(javax.tv.xlet.XletContext context)
throws javax.tv.xlet.XletStateChangeException {

// store a reference to the Xlet context
this.context = context;
hasBeenStarted = false;

try {
container = TVContainer.getRootContainer(context);
}
catch (Exception e){
e.printStackTrace();
}

System.out.println("initXlet() has been called. Xlet context is " + context);
System.out.println("initXlet: RootContainer is " + container);
}

public void startXlet()
throws javax.tv.xlet.XletStateChangeException {

if (hasBeenStarted) {
System.out.println("The startXlet() method has been called to resume the Xlet.");
}
else {
System.out.println("The startXlet() method has been called ...");

container.setLayout(new GridLayout());
container.setSize(new Dimension(440, 320));
container.setLocation(new Point(120, 60));
container.add(this);
container.validate();
container.setVisible(true);
//requestFocus();

hasBeenStarted = true;
}
}

public void pauseXlet(){
System.out.println("The pauseXlet() method has " +
"been called, but we're not doing anything anyway.");
}

public void destroyXlet(boolean unconditional)
throws javax.tv.xlet.XletStateChangeException{

removeKeyListener(this);
System.out.println("The destroyXlet() method has been called.");
}

public void paint(Graphics g) {
Dimension d = getSize();
System.out.println("paint: getSize returned w="+d.width+" and h="+d.height);
g.setColor(new Color(200, 20, 20));
g.fillRect(0, 0, d.width, d.height);
}

public void keyPressed (KeyEvent key){
boolean rp = true;
System.out.println("Key pressed event received: " + key);
}

public void keyTyped(KeyEvent key){
System.out.println("Key typed event received: " + key);
}

public void keyReleased(KeyEvent key) {
System.out.println("Key released event received: " + key);
}

}

Hinkmond Wong

Hi Helmut,

Thanks very much for the testcase. I'll try to reproduce it and when I
do I will create an IssueTracker bug report for it. I'll let you know
if I have any questions and what happens with my tests.

Thanks,
Hinkmond

phonemeadvanced@mobileandembedded.org wrote:
> Hi Hinkmond,
>
> sure, here is one: Below is a tiny Xlet that can be used to see both, the stack overflow, or if requestFocus() is enabled in line 49, that the events are not delivered to the KeyListener.
>
> The qt version I launch from the command line as:
> bin/cvm -cp /home/helmut/jtv/javatv.jar:/home/helmut/jtv/j2me_xml_cdc.jar:/home/helmut/jtv/javatv1.1_01/samples/runxlet:/home/helmut/br/mx RunXlet MiniXlet
>
> The files for the simulator (JavaTV.properties, JavaTVSampleFile01.xml JavaTVServiceFile.dtd and JavaTVServiceFile.xml) have to be copied to ./lib.
>
> When using the port to our graphics device it is launched differently as we have some C main that loads the CVM as a shared library, but the behavior is the same.
>
> Thanks,
>
> Helmut
>
> (Sorry somehow the indentation gets lost here.)
> == MiniXlet ============================================
>
> import java.awt.*;
> import java.awt.event.*;
> import javax.tv.xlet.*;
> import javax.tv.graphics.TVContainer;
>
> public class MiniXlet extends Component implements javax.tv.xlet.Xlet, KeyListener
> {
> private javax.tv.xlet.XletContext context;
> private Container container;
> private boolean hasBeenStarted;
>
> public MiniXlet(){
> }
>
> public void initXlet(javax.tv.xlet.XletContext context)
> throws javax.tv.xlet.XletStateChangeException {
>
> // store a reference to the Xlet context
> this.context = context;
> hasBeenStarted = false;
>
> try {
> container = TVContainer.getRootContainer(context);
> }
> catch (Exception e){
> e.printStackTrace();
> }
>
> System.out.println("initXlet() has been called. Xlet context is " + context);
> System.out.println("initXlet: RootContainer is " + container);
> }
>
>
> public void startXlet()
> throws javax.tv.xlet.XletStateChangeException {
>
> if (hasBeenStarted) {
> System.out.println("The startXlet() method has been called to resume the Xlet.");
> }
> else {
> System.out.println("The startXlet() method has been called ...");
>
> container.setLayout(new GridLayout());
> container.setSize(new Dimension(440, 320));
> container.setLocation(new Point(120, 60));
> container.add(this);
> container.validate();
> container.setVisible(true);
> //requestFocus();
>
> hasBeenStarted = true;
> }
> }
>
>
> public void pauseXlet(){
> System.out.println("The pauseXlet() method has " +
> "been called, but we're not doing anything anyway.");
> }
>
>
> public void destroyXlet(boolean unconditional)
> throws javax.tv.xlet.XletStateChangeException{
>
> removeKeyListener(this);
> System.out.println("The destroyXlet() method has been called.");
> }
>
> public void paint(Graphics g) {
> Dimension d = getSize();
> System.out.println("paint: getSize returned w="+d.width+" and h="+d.height);
> g.setColor(new Color(200, 20, 20));
> g.fillRect(0, 0, d.width, d.height);
> }
>
> public void keyPressed (KeyEvent key){
> boolean rp = true;
> System.out.println("Key pressed event received: " + key);
> }
>
> public void keyTyped(KeyEvent key){
> System.out.println("Key typed event received: " + key);
> }
>
> public void keyReleased(KeyEvent key) {
> System.out.println("Key released event received: " + key);
> }
>
> }
> [Message sent by forum member 'schulp' (schulp)]
>
> http://forums.java.net/jive/thread.jspa?messageID=206879
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
> For additional commands, e-mail: advanced-help@phoneme.dev.java.net
>
>

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

schulp
Offline
Joined: 2006-01-20
Points: 0

Hi Hinkmond,

I just wanted to add that I had tried both MR1 and MR2. Yesterday I finally got also around to check-out the tip of the trunk from the subversion repository. All three revisions, including the latest, behave the same.

Thanks for looking into this,

Helmut

(Pls. keep me posted about your results, thanks.)

Hinkmond Wong

Hi Helmut,

phonemeadvanced@mobileandembedded.org wrote:
> Hi Hinkmond,
>
> I just wanted to add that I had tried both MR1 and MR2. Yesterday I finally got also around to check-out the tip of the trunk from the subversion repository. All three revisions, including the latest, behave the same.
>
> Thanks for looking into this,
>
> Helmut
>
> (Pls. keep me posted about your results, thanks.)

Thanks very much for checking that the bug exists in both pMEA MR1 and
MR2. I've created a bug report in IssueTracker (issue # 16) for this:

https://phoneme.dev.java.net/issues/show_bug.cgi?id=16

I put your description and testcase in it. Please let me know if there
are any corrections or changes needed.

We can use this bug report moving forward in finding a fix.

Are there any phoneME developers out there who would be willing to try
fixing issue # 16 (above)? If so, you could possibly get yourself on
the path to becoming a phoneME project committer (Developer role) and
get credited with your own contribution to this open source project.

Let me know if there is anyone out there who would like to try their
hand at this. You will make a few fellow developers happy and get some
cool recognition. I can help walk through the process with any volunteers.

Thanks,
Hinkmond

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