Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!okstate!romed!drd!mark From: mark@drd.UUCP (Mark Lawrence) Newsgroups: comp.windows.x Subject: AsciiString Widget behaviour Message-ID: <278@drd.UUCP> Date: 12 Sep 88 19:50:52 GMT Reply-To: mark@drd.UUCP (Mark Lawrence) Distribution: na Organization: No! Wait, I think I remember where I put it... Lines: 27 I just discovered something that sort of surprised me about AsciiString widgets. I created a matrix of stringwidgets in a form. I created a matrix of strings: static char *cellstrings[MAXCOLUMNS][MAXROWS] which I used to init my widgets thus: n = 0; XtSetArg(arg[n],XtNstring,cellstrings[i][j]); n++; XtSetArg(arg[n],XtNlength,strlen(cellstrings[i][j])); n++; XtSetArg(arg[n],XtNeditType,XttextEdit); n++ cell[i][j] = XtCreateManagedWidget("cell", asciiStringWidgetClass, form, arg, n); When I run the application and edit a cell, I discover that the editted text shows up in my cellstrings matrix. I assumed that I would have to query widget state via XtGetValues to get at the editted string. Can I depend on the behaviour I've observed or is the latter the canonical way to go about it? Mark -- DRD Corporation @ 5506 South Lewis | [uunet!apctrc,romed,tulsun]!drd!mark Tulsa, IT 74105 (918)743-3013 | mlawrence@jarsun1.ZONE1.COM