Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!gatech!udel!burdvax!coltoff From: coltoff@PRC.Unisys.COM (Joel Coltoff) Newsgroups: comp.windows.x Subject: Get text from a text widget Message-ID: <7622@burdvax.PRC.Unisys.COM> Date: 16 Sep 88 22:11:31 GMT Organization: Unisys/Paoli Research Center, Paoli, PA 19301 Lines: 25 I'm trying to get text from a text widget. i.e. the user enters his text and then the application needs to do something with it. Is there an X function to do this or do I just do a strcpy() or whatever from my char *? The text widget is in a popup and I want to zap the text when I pop down the widget. I'm doing the following. rtext.firstPos = 0; rtext.length = 0; rtext.ptr = NULL; XtTextReplace( w, 0, strlen(p), &rtext); XtSetArg(arglist[0], XtNsensitive, False); XtSetArg(arglist[1], XtNinsertPosition, 0); XtSetValues(w, arglist, TWO ); errorResponse = 0; XtPopdown(error_popup); errorPopupFlag = False; As it stands now the code dumps core on the next event after the widget is popped down. If I comment out the XtTextReplace() everything works fine. Any comments on this? Thanks in advance. -- - Joel {psuvax1,sdcrdcf}!burdvax!coltoff (UUCP) coltoff@burdvax.prc.unisys.com (ARPA)