Command Listener::J2ME
From: Jason D Wolfe (jason_d_wolfe_at_comcast.net)
Date: 08/24/04
- Next message: bernd_no_junk_at_hotmail.com: "best lookandfeel / SWT"
- Previous message: John C. Bollinger: "Re: How can I trap UI events non-intrusively?"
- Next in thread: Alexander Ames: "Re: Command Listener::J2ME"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 24 Aug 2004 03:57:38 GMT
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.
- Next message: bernd_no_junk_at_hotmail.com: "best lookandfeel / SWT"
- Previous message: John C. Bollinger: "Re: How can I trap UI events non-intrusively?"
- Next in thread: Alexander Ames: "Re: Command Listener::J2ME"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|