Michael,

At 11:49 AM 6/21/99 -0700, you wrote:
>I have noticed something in my code that might be a problem.  So, far I
>have not experienced any problems but I'm wondering if this is a bad way
>of doing this.
>
>I have a status field where I display a string of one char.  That field is
>a non-editable field and I use FldSetTextPtr to set the text value to
>display.  My problem is that I use FldSetTextPtr within an event handler
>and use a literal string.
>

<snip>

>For instance, within the OK button handler, I might have:
>
>FldSetTextPtr(fldP, "Y");
>
I believe this should be no problem.  Effectivelym this call will set the
field's text pointer attribute to the address of "Y".  Because this is a
literal (and, therefore, constant), it should be stored in your app's code
segment.  This means the address should not change.  When the field is
redrawn, it should be able to access this address with no problem.

That, at least, is my theory.  Hope this helps.

Greg

Greg Winton
Bachmann Software and Services, LLC
mailto:[EMAIL PROTECTED]
http://www.bachmannsoftware.com
Software Development for Handheld & Mobile Computing, Windows and the Internet
Home of Bachmann Print Manager, the only graphical printing solution for
the Palm Computing Platform

Reply via email to