I am using the serial manager to read in a string. I am sending the string
from the palm, and reading it on the emulator.  The string is stored in a
BytePtr array called pPointer.  To convert the BytePtr to a CharPtr so it
can be displayed using a FrmCustomAlert so i can see what data was sent.  I
use the following code to convert it to a CharPtr.
  x = *pPointer[index];
  y = (CharPtr)*pPointer;
 FrmCustomAlert( ErrorAlert, y, "", "" );
The problem is when i put in the FrmCustomAlert line, y changes.  I don't
know why.  Using the debugger i set a breakpoint right after the frm is
displayed, and it shows that x doesn't have the same value as y.  It has a
random character that is displayed as an outlined heart in the form.  But
when i removed the FrmCustomAlert line, and use the debugger, i see that
both x and y have the values i expect them too.  The problem appears to be
with the FrmCustomAlert line, but have no idea why that would change the
value of y since it doesn't change it. Or does it?  Any suggestions?  I also
tried using the CtlSetLable with the following line,
    CtlSetLabel( getObject( formP, MainDisplayPopTrigger ), y );
and the same thing happened, y wasn't what i expected it to be, but it was a
different character than before.  I really have no idea why this is
happening.
Thanks
Andrew



-- 
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