It remains valid even when the function exists. So next time it enters the
function, it still has the same title.

Max
--- Andy Yeong <[EMAIL PROTECTED]> wrote:
> Hi Max,
> 
> Thanks for your suggestion. Seems simplified and neat.
> Just a question, when will the "static char titlePtr" be
> invalid ? Is it during the program flow leaves the form or
> at the end of the whole program ?
> 
> Thanks !
> 
> Best Regards
> Andy
> 
> Max Bian <[EMAIL PROTECTED]> wrote in message news:69205@palm-dev-forum...
> >
> > You can do the following:
> >
> >      static void UpdateTitle ( char *database_record)
> >  {
> >      FormPtr frm;
> >      static char titlePtr[LONGENOUGH];
> >
> >      StrCopy(titlePtr, databaserec);
> >
> >      frm = FrmGetActiveForm();
> >
> >      FrmSetTitle(frm, titlePtr)
> >  }
> >
> > The static buffer will do the trick.
> >
> > Max
> 
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please
> see http://www.palmos.com/dev/tech/support/forums/


__________________________________________________
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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