Event capturing

I guess PocketC is stealing my Menu events from Fevent as at times, you have to select the same menu item 2-5 times before my program detects the change and acts on it.
Either that or Fevent(0) misses the event since it's not waiting indefinately.
I'm guessing no way around this.
The user needs to be able to draw on the screen, so Fevent(1) is out of the question.

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!

I thought Fevent(1) would not return until it got a result (wait indefinately), so how would the rest of my code run at the same time to process drawing on the screen?
tia.

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!

Posted: Sun Mar 03, 2002 10:06 pm

by jstadolnik

Generally for drawing programs you only want to draw when the user performs a pen event. If the user isn't doing anything you probably shouldn't be drawing. Using a wait time of zero tends to drain the batteries in a hurry, this is because the PDA doesn't get any time to enter sleep mode.

You only need non-indefinite wait times if you are doing animation or a timer of some sort.

Oh yes.
I can use Fevent(1) and that will trap a pen event and only act when that happens.
Nothing will be happening unless the pen is on the screen anyway, so I don't need to scan otherwise.
if (Fevent(1)) { // check for Menu, draw, etc }

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/If you love PocketC, you'll love this!
Join and become part of the community!
News, reviews, free source code and more!