[comp.windows.x] Dialog Widget Value String

kochhar@endor.harvard.edu (Sandeep Kochhar) (08/04/89)

hi!
According to the Xaw manual, 
	"if a string was specified in the XtNvalue resource, Dialog
	will store the input directly into the string" (p. 39).

However, I find that the string I pass is not changed even though
the value string was changed by the user; however, XtDialogGetValueString()
returns the correct (new) string.

Any ideas?
thanks in advance.



Sandeep Kochhar
(617) 495-9515              mail: kochhar@harvard.harvard.edu
Harvard University                kochhar@harvard.csnet
33 Oxford st,                     kochhar@harvard.uucp
Cambridge, Ma 02138               kochhar@harvard.bitnet

"If you didn't get this message, please let me know."

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (08/04/89)

> According to the Xaw manual, 
> 	"if a string was specified in the XtNvalue resource, Dialog
> 	will store the input directly into the string" (p. 39).

The documentation is wrong (sigh).  The Dialog actually makes a local copy
of the string for you.  Since changing the behavior to match the docs
may break some applications, I am planning on updating the docs for R4, and
leaving the implementation the way it currently behaves.

> However, I find that the string I pass is not changed even though
> the value string was changed by the user; however, XtDialogGetValueString()
> returns the correct (new) string.

Yep, to retreive the string you will need to use XtDialogGetValueString(), or
make a GetValues() call.  

						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213