Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!decwrl!hplabs!hpda!hp-sde!hpfcdc!hpfclp!diamant
From: diamant@hpfclp.SDE.HP.COM (John Diamant)
Newsgroups: comp.windows.x
Subject: Re: Dynamic resource sharing by widgets
Message-ID: <9740021@hpfclp.SDE.HP.COM>
Date: 8 May 88 03:46:54 GMT
References: <8805041033.AA26532@ATHENA.MIT.EDU>
Organization: HP SDE, Fort Collins, CO
Lines: 31

> From: ISSLCK@NUSVM.BITNET (Law Chee Keong)
> 
> Now, suppose I do not know which resources a group of widgets will
> share until run-time, how can I dynamically specify widget resource
> sharing through the Toolkit, or is such a facility supplied?
> 
> From: haynes@WSL.DEC.COM
> 
> This means you do not need to do anything special to get
> dynamic resource sharing, as long as you are using the resource manager
> to obtain your resources.

Charles, I think he was asking a slightly different question than you
answered.  I believe the problem is that he wants the user to
be able to specify what widget resources have particular names so that they
may be shared (if they use the same name).  I may be wrong about this
interpration, but it is what I think is being asked.  If my assessment
of the question is correct, then it is a property of the specific widgets
being used.  There is no reason that widgets could not look up their
resources strings dynamically from some global data structure if that
is what were desired, rather than using hard-coded strings as they normally
are (XtN and XtC).  However, that means the widget initialization
procedure would require some global variables to be around in which to
find the resource names and classes.  This would be a great burden to place
on the programmers using the widgets, and it also breaks the object
oriented model (not that it would be the first time), but it is
possible.

John Diamant
Software Development Environments
Hewlett-Packard Co.		ARPA Internet: diamant@hpfclp.sde.hp.com
Fort Collins, CO		UUCP:  {hplabs,hpfcla}!hpfclp!diamant