[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page

Top Document: comp.windows.x Frequently Asked Questions (FAQ) 6/7
Previous Document: 144) How can I incorporate an Xlib program in my Xt program?
Next Document: 146) Why don't XtConfigureWidget/XtResizeWidget/XtMoveWidget work?


145) Why does XtGetValues not work for me (sic)?



	The XtGetValues interface for retrieving resources from a widget is
sensitive to the type of variable. Your code may be doing something like this:
	{
	Arg args[3];
	int i;
	int sensitive;		/* oops; wrong data type */
	i=0;
	XtSetArg (args[i], XtNsensitive, &sensitive); i++;
	XtGetValues(widget, args, i );
	...
	}

But XtNsensitive is a Boolean, which on most machines is a single byte; 
declaring the variable "sensitive" as Boolean works properly. This problem 
comes up often when using particular toolkits that redefine the Xt types 
Dimension and Position; code that assumes they are int will have similar 
problems if those types are actually short. In general: you are safe if you
use the actual type of the resource, as it appears in the widget's man page.
[11/90]



Top Document: comp.windows.x Frequently Asked Questions (FAQ) 6/7
Previous Document: 144) How can I incorporate an Xlib program in my Xt program?
Next Document: 146) Why don't XtConfigureWidget/XtResizeWidget/XtMoveWidget work?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
faq%craft@uunet.uu.net (X FAQ maintenance address)

Last Update October 22 2009 @ 05:36 AM

Some parts © 2009 Advameg, Inc.