ok, i've figured out the original issue regarding handles vs ptr.  That was
the main problem I had before.  Everything now seems to be going ok except
for one thing.
After I dynamically append 3 chars to any of my fields that use this number
pad and then attempt to grafitti a back space I get the following error:

DataMgr.c...DmWrite:DmWriteCheck failed

I'm not making any calls to DmWrite?  Not sure exactly what is going on.

Any help is appreciated.

Thanks,

Steve K


"Steve K" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> I'm trying to implement a number pad for faster data entry into fields.
My
> problem is I want to be able to use both the number pad and good old
fashion
> grafitti as well.  I've gotten it to dynamically update the field based on
> what was selected on the number pad, however, if I return to the field and
> try to backspace or enter any data I receive the following error:
> MemoryMgr.c, Line:4365,NULL handle
>
> I'm pretty sure I know what is going on, so my question then is how do I
do
> it correctly.  Here's the code as is:
>
> //This function takes the number that was pressed on the
> //number pad and concats it to whatever is already in the
> //field.
> static Boolean FldConcatText(FieldType* fldP, char* strBuffer)
> {
>  if(fldP) {
>   //Get the current data of the field and concat strBuffer.
>   char* originalText = FldGetTextPtr(fldP);
>   UInt16 strLen;
>
>   if(originalText) {
>    strBuffer = StrCat(originalText, strBuffer);
>   }
>   strLen = StrLen(strBuffer);
>   if(strLen < FldGetMaxChars(fldP)) {
>    //Writes the strBuffer to the Field
>    FldFreeMemory(fldP);  // initialize everything, just in case.
>      FldSetTextPtr(fldP, strBuffer);
>
>    //Set the cursor to the end of the field
>    FldSetInsPtPosition(fldP, strLen);
>
>    return true;
>   }
>  }
>  return false;
> }
>
>
>
>



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

Reply via email to