[comp.windows.x] Problems with OLIT and the Resource Manager

mls@cbnewsm.att.com (mike.siemon) (03/19/91)

> I have some problems regarding the specificaton of resources for 
> applications written using the OLIT widget set under OW 2.0 (SunOS 4.1.1).
> Specifically, if I initialize my application calling OlInitialize like
> this:
> 
> 	toplevel = OlInitialize("appl", "Appl", ...
> 
> where "appl" and "Appl" are meant to be the application's name and
> class respectively, I can never get my app to understand resources
> like:
> 
> 	Appl*OblongButton.widht: 100

Sorry, this is a bug in the OPEN LOOK 2.0 (USL's designation)
or OpenWindows 2.0 (Sun's designation) toolkit. The details are
a bit murky (in other words I don't recall exactly what is wrong),
but it has to do with the internals of OlInitialize:

OlInitialize(...)
{
	...
	fake_top_level = XtInitialize(..., classname, ...);
	real_top_level = XtCreateApplicationShell("BaseWindowShell", ...);
	...
	return (real_top_level);
}

> I have also problems in specifying resources for some kinds of
> widgets. For instance, the reference manual says that the OblongButton
> widget class has three color resources: "background" for the button's
> background, "fontColor" for the label and "foreground" for the border.
> However, I can only change the label's color through the "foreground"
> resource and the background color through the "background" one, while
> "fontColor" has no visible effect.

This is a rare case where the documentation was ahead of the
code :-) The OPEN LOOK 4.0 (USL) / OpenWindows 2.5 (Sun) release
of the toolkit has added support for this resource.

> Moreover, my buttons are contained
> in a ControlArea widget, for which I cannot set neither the foreground
> nor the background, and I am thus forced to have it white.

Hmmm, this seems strange since that should work. One bug,
though, is the class name for the ControlArea widget is
Control, not ControlArea. This is contrary to both the
documentation and the suggested Xt conventions.

Steve Humphrey
UNIX System Laboratories