That should bomb.  What you need to do is use FldSetTextHandle or call
FldDelete and FldInsert.  With FldDelete and FldInsert, however, you will
need to make the field editable first, change the text, and than make it
uneditable again.

Elia

-----Original Message-----
From: Michael S. Davis [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 21, 1999 11:49 AM
To: [EMAIL PROTECTED]
Subject: Field Pointers: Data persistency


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.

I'm wondering if there will be a problem since this pointer only exists
within the handler might not be valid pointer at some later time.  Or,
does the fact that I am using a literal string guarantee that the pointer
will always be valid?

For instance, within the OK button handler, I might have:

FldSetTextPtr(fldP, "Y");

Now if I redraw the Form or Field at some later time, will the
pointer still exist?  Should field data be kept in Global variables?

Thanks

----------------------------------------------------
Shoot-to-Win

Protect the 2nd Amendment
----------------------------------------------------



Reply via email to