Our framework tries to detect many other types of interrupts besides OS Guis and 
across all OS versions and early enough for
interrupts to be optionally blocked.  So it may well be easier than this, but at least 
I can tell you this seems to work in all our
testing to date.

I will try to pull out just the part that applies to dialog overlays here.  We went 
with the empirical approach that may be defeated
on future OS versions if new dialogs are invented before we update our code.

Ideally, a winExitEvent would work for everything in all OS versions, except that at 
least in OS 3.5 you don't get that event until
it's too late, the overlay has occurred,.and you're now returning.

However, we still use winEnterEvent to tell when we've returned from a dialogue 
overlay.  That's reliable.

Check the event for a keyDown with the following keys:  (Again, I'm grabbing a subset 
of my code..)

// Detect imminent OS overlay dialog:
  case vchrFind:      // find interrupt
  case vchrBrightness: // contrast GUI
  case vchrContrast:  // contrast GUI
  case vchrAlarm:    // pre-Alarm
  case vchrGraffitiReference: // pop up graf ref
  case vchrKeyboardAlpha: // display keyboard
  case vchrKeyboardNumeric: // display keyboard
  case vchrHardClock:     // OS 4.0

WOW! That really seems to be all we check for wrt OS dialogues.
OK, Palm group, did we miss any?
- Jeff

Tilo Christ wrote:

> Hi!
>
> > Your program must then catch any "hard" or "soft" interrupts (we define
> > hard interrupt == appStopEvent, soft interrupt == any OS overlay dialog
> > like FIND, Alarm, Contrast, Keyboard, etc) and ALWAYS set the screen
> > location back to the original, safe location before the interrupt
> > occurs.
>
> I asked a while ago how to find out reliably that an overlay dialog is about to be 
>displayed. I am currently checking for keydown
> events with certain virtual characters, but is there sth. more generic than that?
>
> Cheers,
> Tilo
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to