Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!ames!ncar!mephisto!eedsp!bessel.eedsp.gatech.edu!jensen From: jensen@bessel.eedsp.gatech.edu (P. Allen Jensen) Newsgroups: comp.windows.x Subject: Problem with XtAddEventHandler Keywords: NCSA,ximage,XtAddEventHandler Message-ID: <777@eedsp.eedsp.gatech.edu> Date: 9 Mar 90 21:54:13 GMT Sender: news@eedsp.eedsp.gatech.edu Reply-To: jensen@bessel.eedsp.gatech.edu (P. Allen Jensen) Organization: Georgia Institute of Technology Lines: 52 The following subroutine from the NCSA/ximage contributed software is having a problem. The system is a Sun-4/60 running SunOS 4.0.3 with X windows Version 11 release 4 with fix 1-5 installed and the XAW_BC (Xaw Backwards Compatability) flag turned on. After the XtCreateManagedWidget, ((DialogWidget)w)->dialog.value is pointing to a string consisting of just a NULL byte (""). However, after the XtAddEventHandler call, the value has been changed to 0x3 ! Anyone have any suggestions ? ---------subroutine Make_Dialog------------- Widget Make_Dialog(widget_name,parent,label,defstring,maxlength, x,y,width,height) char *widget_name; Widget parent; char *label; char *defstring; int maxlength; int x,y; int width,height; { Widget w; Arg arglist[10]; Cardinal i=0; XtSetArg(arglist[i],XtNx,x); i++; XtSetArg(arglist[i],XtNy,y); i++; XtSetArg(arglist[i],XtNwidth,width); i++; XtSetArg(arglist[i],XtNheight,height); i++; XtSetArg(arglist[i],XtNlabel,label); i++; XtSetArg(arglist[i],XtNvalue,defstring); i++; /* XtSetArg(arglist[i],XtNmaximumLength,maxlength);i++; */ XtSetArg(arglist[i],XtNsensitive,True); i++; w = XtCreateManagedWidget(widget_name,dialogWidgetClass, parent,arglist,i); XtAddEventHandler(w,EnterWindowMask,(Boolean) 0,CBSetInputFocus,NULL); return(w); }/* Make_Dialog() */ P. Allen Jensen Georgia Tech, School of Electrical Engineering, Atlanta, GA 30332 USENET: ...!{allegra,hplabs,ulysses}!gatech!eedsp!jensen INTERNET: jensen@eedsp.gatech.edu