Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!ncar!ico!auto-trol!marbru From: marbru@auto-trol.UUCP (Martin Brunecky) Newsgroups: comp.windows.x Subject: Re: Re^2: Gadgets in Motif Summary: Some gadgets may be good ... Keywords: Gadgets, Motif, Decwindow Message-ID: <257@auto-trol.UUCP> Date: 29 Aug 89 21:43:13 GMT References: <2586@arisia.Xerox.COM> <322.8908161255@jupiter.cmi.no> <1443@riscy.dec.com> <122257@sun.Eng.Sun.COM> <582@crltrx.crl.dec.com> Reply-To: ncar!ico!auto-trol!marbru (Martin Brunecky) Organization: Auto-trol Technology, Denver Lines: 48 > But as I've > stayed away from toolkit wars, I'll stay away from commenting on whether > gadgets are a good idea or not. Why scared ? The issue of gadget is like everything else. No matter if they are good or bad, they may be MISUSED. I myself like the concept of "ObjectClass", using "objects" for things like WsText widget source/sink, colormap gadget, GC gadget etc. YES, there are holes in R3 Xt support, but still - it gives us object oriented environment in "C", with a LOTS of good features. Now, there are many flavors of Gadgets. One of them pretty much reminds me a doctor curing SYMPTOMS, not the DISEASE. DISEASE, in this particular case, is a STATIC creation of ALL user interface objects ( menu cascade may need hundreds of objects ). However, in a real life, only a fraction of those objects will be active (mapped, used) at any given time - but all of them will eat resources (yyap, memory is virtual). Now, symptomatic treatment will try to make ALL those objects "smaller", "cheaper", while the REAL cure is DYNAMICS. Build the user interface which re-uses objects (such as menus, buttons). Your menu cascade will require 30 buttons instead of 600 (and you will learn how to use SetValues). Naturally, you will need something more reasonable than UIL ( Unfriendly Idiotic Language) - but that's another subject. Gadgets that require a manager widget re-implementing lots of the server functionality (such as tracking pointer to generate gadget enter/leave events, generating expose events) not only create overhead (lots of protocol traffic, potential for receive buffers overflow when client is busy etc.etc.etc.) They have another problem. To do it's things "right", the manager widget makes ASSUMPTIONS about children. He "knows" what children wil be, how they behave, how to highlight them etc. And I consider that fundamentally WRONG. WRONG, because it makes it really difficult to add/augment/modify/enhance existing widget set - and how often are we happy with what we get. ############################################################################### Martin Brunecky, Auto-trol Technology Corporation, 12500 North Washington Street, Denver, CO-80241-2404 (303) 252-2499 ncar!ico!auto-trol!marbru ###############################################################################