The code below has worked well on all handhelds I ever put my paws on – but failed miserably on the simulator:
FrmSetFocus(pForm,FrmGetObjectIndex(pForm,FldShadow)); //allows GSPDA T9 keys to function
handled = true;
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!