further info,
it meight also be the way I convert the int back to a Char*
as I've tried using:

WChar wch = eventP->data.keyDown.chr;
Char str[2];
StrPrintF(str,"%c",wch);
int val = StrAToI(str);

with the same result as before.
now my sudo_ins function looks like this:

void sudo_ins(FormPtr frmP, UInt16 idx, int val) {
  FieldPtr fldP = (FieldPtr)FrmGetObjectPtr(frmP, idx);
  UInt16 ID = FrmGetObjectId(frmP,idx);
  int x = (ID-1)%9;
  int y = (ID-1)/9;
  if(!SB->ins(x,y,val)) {
    FldDelete(fldP, 0, 1);
  } else {
    MemHandle ftxt = MemHandleNew(sizeof(Char));
    FldSetTextHandle(fldP, NULL);
    Char *fldT = (Char*)MemHandleLock(ftxt);
    Char *str = (Char*)MemPtrNew(sizeof(Char)*2);
    str = StrIToA(str,val);
    StrNCopy(fldT, str, 1);
    MemHandleUnlock(ftxt);
    FldSetTextHandle(fldP, ftxt);
    FldDrawField(fldP);
  }
}
again thanks for any useful information.
René Kjellerup

PS
just a bit of gall...

Dmitry,
I'd like to point out to you that the nature of my GUI design hasn't
changed and here's a quote from my original problem

"All my 81 fields can max contain 1 charater and they can only be a
number,"

so if it is impossible for you to see that my previous reply were an 
update and that anything not regarding capturing charaters would 
still be true. Then please just see this as my way of telling you
out right to understand the problem before trying to help anyone
with it.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to