Hi,

        your fields must have a handle set (they have by default).
In "sudo_ins" you call FldSetFieldPtr with an empty (probably also
constant) string so that any attempt to write to it is an error.
You can use FldDelete to clear the field instead.

I also don't think you have to handle fldEnterEvent, simply handle
keyDownEvent, get the current field (FrmGetFocus) and verify that 
it is a corerct value for that field 
(eg. eventP->data.keyDown.chr ~ [1..9] :) and simply return true 
from your event handler if it isn't (so that the field won't 
ever see that key).

Regards,
        Miro


 

>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of René 
>Kjellerup
>Sent: Thursday, July 13, 2006 00:27
>To: Palm Developer Forum
>Subject: Using Fields
>
>Hi',
>
>I'm some what new to PalmOS development, I have read about 
>some APIs which I think I need to do what I want. However I 
>seem to get a crash in my code when do.
>
>I've added the main files, the prc-tool GUI design, and the 
>main form event handler, with some custom drawings.
>
>All my 81 fields can max contain 1 charater and they can only 
>be a number, it's, if couldn't guess it, for a sudoku 
>interface, and I'd like to know how to handle the charater 
>input as it happens. I've read that this isn't the preferable 
>way to do things when working with fields but the other way 
>doesn't seem to apply in my case.
>
>My guess is to use the "FldHandleEvent()" function, but how and where?
>
>My Thanks for any help in this matter.
>
>René Kjellerup
>--
>For information on using the PalmSource Developer Forums, or 
>to unsubscribe, please see http://www.palmos.com/dev/support/forums/
>


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

Reply via email to