Hello All,

I am working on a program and I want to have the user be able to enter
numbers into an editable text field using an onscreen keyboard or using
graffiti. The graffiti part works just fine but I cann't get my keyboard to
work. Code is as follows:


    //from mainfrom event loop

        Char* theDigit;
        FieldPtr fieldPtr;

        case ctlSelectEvent:
            switch (eventP->data.ctlSelect.controlID)
            {
                case (MainOneButton):
                    theDigit = "1";
                    break;
                case (MainTwoButton):
                    theDigit = "2";
                    break;
                //code removed here to shorten post....
                
                   fieldP = GetFocusObjectPtr(); //gets field with the focus
                   appendCharToField (fieldP, theDigit);
                
                //more code removed


//code to insert theDigit into the text field

static void appendCharToField (FieldPtr fieldP, Char* theDigit)
{
    FldInsert (fieldP, theDigit, 1);
}


Everything compiles fine but when I tap keyboard buttons, nothing happens.
Nothing is inserted into the field. What am I doing wrong here. Should I not
be using FldInsert() to do this? I thought it would be easier than getting
the text out of the field, then altering it and placing it back into the
field.

Any help is appreciated.

Thanks,

Andy



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

Reply via email to