The code below has worked well on all handhelds I ever put my paws on – but failed miserably on the simulator:
case frmOpenEvent:
createLVL();
FrmDrawForm(pForm);
StrCopy(vars.msg1,"Action!!");
vars.msg1_framestolive=MSG_LIFETIME;
lasttic=TimGetTicks();
FrmSetFocus(pForm,FrmGetObjectIndex(pForm,FldShadow)); //allows GSPDA T9 keys to function
handled = true;
break;
The simulator gave an alert along the lines of “Invalid insertion point” – WTF?
The alert text above is a classic example for a completely unrelated error message – the reason for the alert is simple: the text field FldShadow is not high enough for the text it should contain. Just increase the height of the field – and the fatal alert is gone for good!
Related posts: