🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #25560

RE: Xtoolkit design error

#25560
From: price
Date: Sat, 09 May 1987 06:45
37 lines
2307 bytes
Adam J. Ricter writes:

   According to the X toolkit documentation, when you associate a
  geometry manager with a window, you cannot directly pass any
  additional information.  This is incredibly stupid.  In the other
  parts of the toolkit, anytime you specify a call-back procedure that
  takes a window, you can also specify an extra argument to explain what
  the window is, which is incredibly smart.

I am not convinced at all that this is "incredibly stupid". I believe
the comparison between geometry managers and callback procedures is
innaccurate. I have not found the need to associate any data with
windows for which I register a geometry manager. Geometry managers
typically only care about screen arrangement, not content of individual
windows. Adding an extra argument means that I would have to pass
a NULL for the *great* majority of calls, which I think would be a
pain.

A simple solution exists with the current toolkit, requiring no changes.
Instead of adding yet more parameters to the interface, associate your
geometry information with the window using the Context Management
facilities. Using Context Management, you can associate any amount of
information you wish with the window, and retrieve it within the
geometry manager.

PS: Be kind to our toolkit designers. They really *are* working hard
to make a great mass of free software, and I have yet to find one of 
them who is incredibly stupid.

...A little numb from lack of sleep, maybe, but not stupid. :-)

-----------
Chuck Price                      Internet: port!price@decsrc.DEC.com
Digital Equipment Corporation    UUCP: ...!decwrl!decsrc!port!price
                                 EasyNet: decsrc::"port!price" 
"See the cat? See the cradle?"   DECmail: PRICE@WRO
Technical Details
Message-ID: <8705090656.AA28584@src.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!port.UUCP!price

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!port.UUCP!price
From: price@port.UUCP
Newsgroups: comp.windows.x
Subject: RE: Xtoolkit design error
Message-ID: <8705090656.AA28584@src.dec.com>
Date: Sat, 9-May-87 02:45:17 EDT
Article-I.D.: src.8705090656.AA28584
Posted: Sat May  9 02:45:17 1987
Date-Received: Sun, 10-May-87 02:07:38 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 37