From: "druid" <[EMAIL PROTECTED]>
> This is what worked finaly
> Thanks to all who helped, it seems that when you create
> any key or enter event, all default action is ceased
> and must be hard coded.
>
Well, as I indicated in my email, when I used
static Boolean frmMain_fldName_OnfldEnter(EventPtr event)
{
    SysKeyboardDialog(0);
    return true;
}
it worked as expected and didn't fault.  I only tried four or
five iterations but this seemed sufficient since you'd reported
a crash after three.  I still suspect that there was something
else going on with your code.  Your last response that when
you took out the keyboard popup the crash went away doesn't
mean the rest of your code is bug-free, just that the problem
went away.  This can sometimes mean that memory or stack
corruption is happening, but that's it's not affecting important
areas of memory.  You can also have code that will work OK
as long as you don't change the active window.

It's good that you can continue moving forwards, but I'd treat
the underlying problem as mising rather than fixed.

Chris Tutty

> UInt16  entered_name = 0;
>
> static Boolean frmMain_fldName_OnfldEnter(EventPtr event)
> {
> // Insert code for fldName
> FormPtr form;
> Boolean handled = false;
> FieldPtr fldP;
>
> form = FrmGetActiveForm();
> FrmSetFocus(form, FrmGetObjectIndex(form, fldName));
> fldP = FrmGetObjectPtr(form, FrmGetObjectIndex(form, fldName));
> if(entered_name < 1) EvtEnqueueKey(vchrKeyboardNumeric, 0,
commandKeyMask);
>     entered_name = 1;
> FldDrawField(fldP);
>     handled = true;
> return true;
>
> }



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

Reply via email to