[comp.windows.x] .Xdefaults

mohamedh@cat24.CS.WISC.EDU (Mohamed Mohamedhashim) (10/06/88)

I am trying to set the resources of a command widget from within 
the .Xdefaults file.

The name of the application is "xg", the widget instance is 
called "hit", and this is what I have.

xg*hit.width	:300
xg*hit.height	:200
xg*hit.x	:950
xg*hit.y	:650

This doesn't work - I'd still need to use the mouse to specify location and
size of the window.

BUT, if I change it to:

xg*hit.width	:300
xg*hit.height	:200
xg*.x		:950
xg*.y		:650

it works!! i.e. no user interaction necessary.

What is the correct string (instance/class name perhaps) that should be 
inserted between "xg" and "x"?

Thanks in advance for any advice/comments!

Isa

asirjani@WSU.EDU (02/25/89)

Recently, we have upgraded our Tektronix 4317 from X10 to X11R2.
Since than, none of the applications (xterm, bitmap, ...) look at
.Xdefaults.

I was wondering if anyone else had the same problem, and if so how
did you fixed it.

thanks
A. Sirjani
asirjani@cs2.wsu.edu

jstravis@athena.mit.edu (John S. Travis) (02/22/90)

I have a simple graphics program that plots points of lines.
However, when i run it I get this message:

X Toolkit Warning: Form: The reference widget was not found.
X Toolkit Warning: Form: The reference widget was not found.

despite the fact that I appear to have taken care of that in my .Xdefaults
file. the weird thing is I only get this message on the schools VAXes.
When i ported it over to my prof DEC3100 it worked fine placing the menus
at top and the canvas below. On the Vaxes, the menus overlap on the 
canvas-I guess b/c they are not attached. Why is there the diffrence.
Below is part of the code, creating the widgets as well as the
relevant resource file.

thanks for any help
john travis
jstravis@athena.mit.edu

---------------------------------------------------------------
  toplevel = XtInitialize(argv[0],"Stream",NULL,0,&argc,argv);
  framework = XtCreateManagedWidget("framework",XwformWidgetClass,toplevel,NULL,0);
  menu = XtCreateManagedWidget("menu",XwrowColWidgetClass,framework,NULL,0);

  scale_it(data[0].Xmax,data[0].Ymax,data);

  XtSetArg(wargs[0],XtNheight,data[0].Ymax * data[0].scale_factor);
  XtSetArg(wargs[1],XtNwidth,data[0].Xmax * data[0].scale_factor);
  canvas = XtCreateManagedWidget("canvas",XwworkSpaceWidgetClass,framework,wargs,2);


###########################################
# Stream resource file
###########################################
Stream*canvas.yRefName:                  menu
Stream*canvas.xRefName:                  framework
Stream*canvas.xResizable:           TRUE
Stream*canvas.xAddWidth:            TRUE
Stream*canvas.yResizable:           TRUE
Stream*canvas.xAttachRight:         TRUE
Stream*canvas.xAttachLeft:          TRUE
Stream*canvas.yAddHeight:                TRUE
Stream*canvas.yResizable:                TRUE
Stream*canvas.yAttachTop:                TRUE

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (02/22/90)

> I have a simple graphics program that plots points of lines.
> However, when i run it I get this message:

> X Toolkit Warning: Form: The reference widget was not found.
> X Toolkit Warning: Form: The reference widget was not found.

> despite the fact that I appear to have taken care of that in my .Xdefaults
> file. 

What is probabally happening is that the Form widget's string to widget
converter is searching all children of the form for a widget named by your
resource string, and that widget hasn't been created yet.

For instance this would cause that problem:

	XtCreateWidget("number1", form...);
	XtCreateWidget("number2", form...);

	*number1*xRefName:	number2

Since number2 has not been created when number1 is trying to convert its
resources you end up with an error message.

						Chris D. Peterson     
						MIT X Consortium 

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

adri@dutncp8.tudelft.nl (A.B. van Woerkom) (01/05/91)

dlbst1@unix.cis.pitt.edu (Donald L. Bonaddio) writes:

>Hello 
>     I am looking for a good .Xdefaults file. Does anyone have
>a neat one to send me? I am a new X user aand I don't knnow where to 
>begin. I am running X on a HP400T workstation(8 plane color).

See if /usr/lib/X11/sys.Xdefaults exists and copy it to .Xdefaults in your
home directory.  On my HP workstation (a 9000/360) it not only contains
standard resource settings for programs like hpwm and hpterm
but also templates for customizing this programs.

>Thanks in advance,
>	                  DB
Hope this helps.
--
A.B. van Woerkom, adri@dutncp6.tudelft.nl
Delft University of Technology, Faculty of Applied Physics, Physics
Informatics Group, section Computational Physics, Lorentzweg 1,
2628 CJ  DELFT, The Netherlands
________________________________________________________________________
"Unfortunately, the current generation of mail programs do not have checkers
 to see if the sender knows what he is talking about" (A.S. Tanenbaum)