473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

CommandListerer:::J2ME

If this is not appropriate for this newsgroup I apologize in advance, please
direct me to the appropriate group...

I have created a canvas object and set it as the current displayable in the
current display. The command listner is the class that I created and called
the canvas object from. I added commands to the canvas, to be caught by the
commandListener (which is set to the class that created the canvas). The
problem is this... Since I registered and added the exit command, a 'soft'
command, it is caught and it works correctly.... If I press a number key, it
is caught by the canvas object... If I want to press a number key, and have
it 'appear' to execute a function that is part of the calling class
(basically be caught by the command listener as does the exit 'softkey'....
how do I do this? I suspect that it would be something like this...

protected void keyPressed(int keyCode) {
if (keyCode == 1) {
'classThatCreatedThisCanvas'.doWhatIWant();
}
}

In the end, I just want to give control back to where it was before the
canvas so that I can create other canvases and set them as the current
displayable

THANKS SO MUCH FOR THE HELP.

Jason Wolfe.
Jul 17 '05 #1
0 1465

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.