I have a basic event shell that I'm using for testing.
When I process pen events before SysHandleEvent(&event), I get the full
160 x 220 screen, but the silk buttons are, naturally, dead.
When I process pen events after SysHandleEvent(&event), I can then
successfully click on the silk screens and get appStopEvents, and
everything works great.
BUT -> when the user hits the 123 or abc buttons, rather than send an
appStopEvent, the SysHandleEvent(&event) just goes ahead and tried to
display the dialog. Which is fine, except it crashes hard, reading from
low memory.
The ONLY thing non standard about my situation is that I have not yet
activated my main form, i.e., I have not yet done:
pFrm = FrmInitForm(JosMainFormForm);
if (pFrm)
{
FrmSetActiveForm(pFrm);
FrmDrawForm ( pFrm);
}
Any ideas as to why this is crashing? I'd hate to have to try to
simulate the silk buttons myself just so the user CAN'T hit 123/abc....
Here's the asm crash point (no SDK source I'm afraid...)
SysHandleEvent => PrvHandleEvent => SysKeyboardDialog => FrmGetFocus:
10C5CDB2: 30280036 move.w 54(a0),d0
10C5CDB6: 4E5E unlk a6
10C5CDB8: 4E75 rts
a0 = 0 and d0 = 0 !!!
(and it continues....)
10C5CDBA: 8B46 or.w d5,d6
10C5CDBC: 726D moveq #109,d1
10C5CDBE: 4765 dc.w 0x4765 ; Invalid
opcode
10C5CDC0: 7446 moveq #70,d2
10C5CDC2: 6F63 ble.s *+101 ; 0x10c5ce27
10C5CDC4: 7573 dc.w 0x7573 ; Invalid
opcode
10C5CDC6: 00004E56 ori.b #0x56,d0
10C5CDCA: 000048E7 ori.b #0xe7,d0
10C5CDCE: 1E38246E move.b 0x0000246e,d7
10C5CDD2: 00083C2E ori.b #0x2e,a0
10C5CDD6: 000C0C6A ori.b #0x6a,a4
10C5CDDA: FFFF dc.w 0xffff ; Invalid
opcode
10C5CDDC: 003667000082 ori.b #0x0,(-126,a6,d0.w)
10C5CDE2: B5F801F0 cmpa.l 0x000001f0,a2
10C5CDE6: 667A bne.s *+124 ; 0x10c5ce62
10C5CDE8: 3A2A0036 move.w 54(a2),d5
10C5CDEC: BA46 cmp.w d6,d5
10C5CDEE: 6772 beq.s *+116 ; 0x10c5ce62
10C5CDF0: 7006 moveq #6,d0
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/