Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Mobile Tools for Java (MTJ) » MMAPI: Moto Q8 emulator fails
MMAPI: Moto Q8 emulator fails [message #570651] Tue, 13 January 2009 20:46
Eclipse UserFriend
Originally posted by:

I'm working on a program which makes use of Midi playback. Now I
encountered an odd problem. Just by random i picked up the Moto Q8
emulator. My program successfuly runs on all other emulators I've tried.
So I tracked te problem down to the simplest possible example to show
the problem. The crash happens in the constructor of the canvas class.
Since it works on all other emulators I've checked, I ask myself what's
wrong with my code or what's wrong with the Moto Q8? I'm really clueless


================, TOP OF FILE =================
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class TestQ8MIDlet extends MIDlet {
canvasQ8 cv;

public TestQ8MIDlet() {
cv = new canvasQ8();

protected void destroyApp(boolean arg0) throws
MIDletStateChangeException { }
protected void pauseApp() { }
protected void startApp() throws MIDletStateChangeException { }
===================, BOTTOM OF FILE ===============

===================, TOP OF FILE =================
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Graphics;

public class canvasQ8 extends Canvas {
public class EventHandler implements PlayerListener {
public void playerUpdate(Player player, String event, Object
eventData) {
if (event == PlayerListener.END_OF_MEDIA) {
EventHandler myEventHandler;

public canvasQ8() {
// this line causes te crash
myEventHandler = new EventHandler();

protected void paint(Graphics arg0) { }
===================, BOTTOM OF FILE =================
Previous Topic:startApp threw an Exception
Next Topic:[mtj 0.9.1+Eclipse 3.4.l+WTK 2.5.2]mtj console output garbage character
Goto Forum:

Current Time: Sun Jun 24 05:40:16 GMT 2018

Powered by FUDForum. Page generated in 0.01914 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top