While my app display its Map form, I disable on screen Graffiti to
prevent misinterpreting stylus gestures when zooming. But when I
call some modal dialog with the menu, I want to re-enable on screen
Graffiti. Yet, if I trap winEnter/Exit events, I notice I do get
them for the menu, but when I open a modal dialog, the
winEnter.enterWindow corresponds to the Map form "underneath", never the modal
dialog.
Doesn't opening a modal dialog trigger a winExit event in the
calling form? Or must I re-enable on screen Graffiti in every modal
dialog handler? (tedious and inelegant)
Here's my code in the Map form handler (gOnScreenGraffiti is set to true once
and for all in the frmOpenEvent when it is detected to be enabled):
case winEnterEvent :
if ( gOnScreenWriting )
if ( event->data.winEnter.enterWindow == ( WinHandle ) FrmGetFormPtr(
MapForm ) )
SetGoLcdStatus( goLcdDisabled );
else if ( event->data.winEnter.exitWindow == ( WinHandle )
FrmGetFormPtr( MapForm ) )
SetGoLcdStatus( goLcdEnabled );
break;
case winExitEvent :
if ( gOnScreenWriting )
if ( event->data.winExit.exitWindow == ( WinHandle ) FrmGetFormPtr(
MapForm ) )
SetGoLcdStatus( goLcdEnabled );
else if ( event->data.winExit.enterWindow == ( WinHandle )
FrmGetFormPtr( MapForm ) )
SetGoLcdStatus( goLcdDisabled );
break;
...
void SetGoLcdStatus( GoLcdStatusType status )
{
if ( GoLcdGetStatus( gGoLCDLibRefNum ) == status )
return;
UInt32 dummy;
LocalID LID = DmFindDatabase( Card0, "AppSlipGoLCD" );
if ( LID )
SysAppLaunch( 0, LID, 0, 0x7F00, NULL, &dummy);
}
Luc Le Blanc
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/