> Yes, it's safe.  I learned it in the developers class in order to
> initialize "labels" that I wanted to be right justified and bold.
[...]
> </edg>

Thanks. However, this is not exactly my point.

I know it's possible to initialize a field from a string resource, but can I
rely on the FldGetTextHandle(fld) returning 0 to determine thatI did a
FldSetTextPtr instead of a FldSetTextHandle ?

-- Denis.


> >// on frmOpenEvent :
> >
> >pText = getTextPtr();  // which returns a MemPtrNew'ed pointer
> >if (pText)
> >     FldSetTextPtr(fld, pText);
> >else
> >{
> >     hText = DmGetResource(...);
> >     FldSetTextHandle(fld, hText);
> >}
> >
> >...
> >
> >// on frmCloseEvent :
> >
> >hText = FldGetTextHandle(fld);
> >if (hText)
> >{
> >     DmReleaseResource(...);
> >     FldSetTextHandle(fld, 0);
> >}
> >else
> >{
> >     pText = FldGetTextPtr(fld);
> >     MemPtrFree(pText);
> >}
> >
> >
> >
> >--
> >For information on using the Palm Developer Forums, or to unsubscribe,
> >please see http://www.palmos.com/dev/tech/support/forums/
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


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