Yes, the value returned by pgGetString is only valid until the next PicoGUI API call, as it's stored in a temporary buffer by cli_c. If you want to save a copy you'll probably want to use strdup(pgGetString(foo)) then free() the string when you're done.
On Tue, Apr 02, 2002 at 01:10:46PM +0000, Mark and Janice Juszczec wrote: > > > Hi folks > > Just a PIM update. > > Had to set up some hardware over the weekend and tend to a sick kid but I > had 3 days off and some time to play with the PIM. I worked with > pgorganizer a bit and ran into a few things I didn't understand. > I'll try to post those here if anyone is interested. > > Since I couldn't get around my pgorganizer problems, I created a little > framework for the PIM app. I will make the code available after I get a > calendar function in it, add an editable widget for entry detail display > and comment the code. > > One question. I use > > result=pgGetWidget(pgGetEvent()->from,PG_WP_TEXT); > txt=pgGetString(result); (char *txt) > > to get the contents of a clicked on PG_WIDGET_LISTITEM. > > I send it to pgMessageDialogFmt for display and when I exit > pgMessageDialogFmt, the string in txt has been overwritten. Is this a > known side effect, did I stumble on something new or did I screw something > up? > > Mark > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > > _______________________________________________ > Pgui-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/pgui-devel -- Only you can prevent creeping featurism! _______________________________________________ Pgui-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/pgui-devel
