java.awt.Frame and System.currentTimeMillis()
I have put new b86 builds of pMEA on my website
I have changed the way how AWT Frames are created. They are now always full
screen without covering the top system bar. I actually ignore the size of the
frame that the user may have set. I could also cover the top system bar so
that you can no longer access the application menu or an application
switcher. I did not do this because if your application does not close
properly, you may have no other choice then to reset the PDA to terminate the
application. I also removed the decoration of the AWT Frame to save some
space and be more consistent with other native Windows Mobile applications.
Of course, this also means that for a WinCE platform with an 800x600 display,
the full screen would be used for any AWT application.
I changed the implementation of currentTimeMillis by relying both on the
GetSystemTime and GetTickCount to get a finer granularity than seconds. The
current implementation should be able to compute the time correctly after a
suspend and resume. Like I stated in a previous mail, the current time in
milliseconds is based on the GetTickCount value which returns the number of
msecs since device startup. To get the number of msecs since 1/1/70 I have to
add a delta. This delta remains fixed as long as you do not suspend and
resume a running application. If after a suspend and resume the difference
with the system time is more than 1 second, I recompute the delta.
I also received several reports of people that experienced an exception (error
code c0000005) when using a virtual keyboard and filling in an AWT text
field. It appears to only occur on Windows Mobile 6 platforms and I have been
able to trigger the exception with builds of a more than a year old. I
currently have no fix for this problem yet as I do not know what is causing
this behavior. Nonetheless, those who reported on the java.awt.Frame and
System.currentTimeMillis issues are free to test the new builds and provide
feedback on the forum.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com