> The procedure to put text in the Text Field
> static void SetFieldData(FieldPtr fld, char*
> NewData)
> {
>  VoidHand textHandle,oldTxtH;
>   CharPtr textPtr;
> 
>   /* get the old text handle */
>  textHandle = MemHandleNew(StrLen(NewData) + 1 );
>   textPtr = (char *)MemHandleLock(textHandle);
> 
>  /* change the text and update the display */
>  StrCopy(textPtr, NewData);
>  MemHandleUnlock(textHandle);
> 
>  oldTxtH = FldGetTextHandle(fld);
>  FldSetTextHandle(fld, textHandle);
> 
> /* free the old text handle */
>  if (oldTxtH)
>   MemHandleFree(oldTxtH);
> 
>  FldDrawField(fld);
> }
> 
> The Text that i assign
>  typedef struct
>  {
>    ......
>     .....
>     .....
>      SWord TipoPeso;
>      char Valores[18][8];
>      char Peso[6];
>  }ArchivoTipo ;
> 
>  char  texto[13];
> ArchivoTipo *RecordPtr;
>  VoidHand recHandle;
> 
> 
>  frm = FrmGetActiveForm();
>     FpValorAseg = FrmGetObjectPtr(frm,
> FrmGetObjectIndex(frm,EditVAseguradoFieldField))
> /* In the constructor  the field
> EditVAseguradoFieldField has 13 in Max
> Character property*/
Shouldn't this(Max Char) be 14?  I don't have a
computer in front of me that I can test this on, but
if you want everything to be stored, you have to
remember the null character also... :-)
I doubt that'll fix your problem, but I do remember
having to change this in a couple of my programs in
order to get them to compile.
If that's not it, it might uncover something else that
could be giving you the problem... and if not, it'll
just save you a headache later. :-)


> 
>  recHandle = DmQueryRecord(FaTipoDB, CodAct);
>   if (recHandle)
>   {
>   RecordPtr = MemHandleLock(recHandle);
> 
> StrCopy(texto,RecordPtr->Valores[17-ModeloInd]);
>     StrCat(texto,"000");
>     SetFieldData(FpValorAseg, texto);
>     StrCopy(ValorAsegFas,texto);
> .
> .
> .
> .
> 
> 
> 
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com


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

Reply via email to