Path: utzoo!attcan!uunet!lll-winken!ames!oliveb!apple!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: capturing user input to an Athena text widget Message-ID: <8904271534.AA02563@expo.lcs.mit.edu> Date: 27 Apr 89 15:34:50 GMT References: <2453@lll-lcc.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 36 > I find the documentation for Athena text widgets rather obscure... The programmers have been writing the docs again :-) > scrollOnOverflow|scrollVertical|wordBreak|editable (<- I'm not sure if > it does any good to put 'editable' here since I'm in textAppend > mode??). It does nothing at all in this case, except possiblly give you a warning message. > 1. Am I correct to use textAppend and asciiDiskWidgetClass? Seems fine to me. > 2. How do I capture the user's input to a variable? If you are using an asciii disk widget you can read the file. Yea, that is kind of gross. The other thing you can do is use a disk widget for the output and a string widget for the input. Then if you pass a properly allocated string and lenght of this string (XtNstring and XtNlength) the text widget will use it in place and you can just look at the string. > 3. If using asciiDiskWidgetClass is correct, what would be the best > way of clearing the file every once in awhile, since this program > may be running for days at a time? Should I just close it and > then reopen it? To be safe you should destroy the disk source, remove the file, and then create a new disk source with a new file. Chris D. Peterson MIT X Consortium