logo       

Re: Plea for assistance...: msg#00246

java.sun.kvm

Subject: Re: Plea for assistance...

I may be reading things wrong, but according to the MIDP 2.0 specification:
"The Canvas object defines several methods that are called by the
implementation. These methods are primarily for the purpose of delivering
events to the application, and so they are referred to as event delivery
methods. The set of methods is: showNotify() hideNotify() keyPressed()
keyRepeated() keyReleased() pointerPressed() pointerDragged() pointerReleased()
paint()
These methods are all called serially. That is, the implementation will never
call an event delivery method before a prior call to any of the event delivery
methods has returned."

This is pulled word for word from the Canvas class description under the Event
Delivery heading. I would say that this is a bug in the VM. (Unless I am
missing something.)

Tim


-----Original Message-----
From: A mailing list for KVM discussion [mailto:KVM-INTEREST@xxxxxxxxxxxx] On
Behalf Of Mark Young
Sent: Wednesday, December 17, 2003 2:36 PM
To: KVM-INTEREST@xxxxxxxxxxxx
Subject: Re: Plea for assistance...


Adrian Hill wrote:
> <snip>
>
> I'm quite suprised that the J2ME framework is not set up so that a
> keypress will only execute until all preceding keypresses have been
> handled. Surely that would be the right way to do things?

nope

> Back to the problem now... To avoid this multiple keypress
> unpleasantness, I have tried to add methods like...
>
> if (!keyHasBeenPressed) {
> keyHasBeenPressed = true;
> executeMyStuffNow();
> }
>
> ... but sometimes it will not even get as far as the
> executeMyStuffNow() call (although it does have time to set
> keyHasBeenPressed to true) and the impatient user is left on the same
> screen as before.
>
> Please could someone set me straight on this issue?
>
> Thanks in advance, best regards,

Could you explain a bit what you're trying to do? If you're processing key
events I'll assume you have a Canvas that wants to do something in response to
a key press. Just elaborate what it is you're trying to do and we can tell you
how to do it.

Regards,

- Mark

===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body of
the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@xxxxxxxxxxxx and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@xxxxxxxxxxxx and include in the body of the message "help".



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise