Path: utzoo!attcan!uunet!husc6!rutgers!apple!billd From: billd@Apple.COM (William Dorsey) Newsgroups: comp.windows.x Subject: XtTextReplace call Message-ID: <15175@apple.Apple.COM> Date: 4 Aug 88 23:33:30 GMT Reply-To: billd@apple.com (William Dorsey) Organization: Apple Computer Inc, Cupertino, CA Lines: 29 Has anyone gotten the XtTextReplace call to work? I've set up a text widget with an initial string to display, and then tried the XtTextReplace call to update the string, but I repeatedly get segmentation faults. I've tried many combinations, but to no avail. Any hints or suggestions would be appreciated. Here is the relevant code: ---------------------------------------------------- XtTextBlock wtext; void callback(w, client_data, call_data) Widget w; caddr_t client_data, call_data; { wtext.firstPos = 0; wtext.str = "hello"; wtext.length = strlen(wtext.str); XtTextReplace(w, (XtTextPosition) 0, (XtTextPosition) strlen(init_msg)-1, wtext); } ---------------------------------------------------- Basically, I want to replace the existing text in the widget with a new string. Thus I am specifying the beginning and ending locations of the old string as the first and last characters to be replaced. Is this correct? Thanks in advance, Bill Dorsey billd@apple.com