I have noticed something that seems odd with the functions XmTextGetString and XmTextFieldGetString.

When these functions are called to read the text typed in an XmText widget, they cause a segmentation fault. However, using XtGetValues instead avoids the segmentation fault.

I have the impression this is a new behavior as I have a script that was using XmTextGetString that was not segfaulting in the previous versions of CDE. This does not seem locale related, segmentation fault

happens both with the fr_FR and the C locales.

Am I misusing these functions or is it a regression in dtksh ?

Best,

E. Orignac


machin() {
# Good z contains the value that has been typed 
XtGetValues $TEXT0 value:z
# Bad either of these 2 functions is causing a segmentation fault
#XmTextGetString z $TEXT0
#XmTextFieldGetString  z $TEXT0 
echo $z
}

XtInitialize TOPLEVEL text TExt "$0" "$@"

XtCreateManagedWidget FORM form XmForm $TOPLEVEL \
    marginHeight:15 \
    marginWidth:15

#XmCreateLabel LABEL0 $FORM label0 labelString:"File to search" 
XmCreateText TEXT0 $FORM text0 activateCallback:machin

#XtManageChild $LABEL0
XtManageChild $TEXT0
XtRealizeWidget $TOPLEVEL
XtMainLoop
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to