🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #381

Re: examples/cedit, and a modest proposal

#381
From: Mark Linton
Date: Tue, 08 Sep 1992 16:11
38 lines
2549 bytes
In article <PSHANNON.92Sep7172913@iapetus.cv.nrao.edu>, pshannon@iapetus.cv.nrao.edu (Paul Shannon) writes:
|> So I'm posting this note to comp.windows.interviews with questions,
|> and a tenative offer of some volunteer labor from me.  I want to help
|> create a small library of carefully written, detailed and extravagantly
|> commented example programs that will make it easier for the neophyte to
|> learn InterViews.

I would be delighted if the example programs had more comments.
The reference manual is higher priority on our list, but we haven't
had much time for either lately.

|> class ColorViewer: public Patch, public Adjuster
|> 
|> 	There's only one of these objects, and it displays a rectangle
|> 	whose color is determined by the values of the three Valuators.
|> 
|> Here -- to me -- is the rub.  The IV manual, section 7.5, says:
|> 
|> 	"An adjustable is an object that handles requests to modify
|> 	 its view.  An adjuster is an object that can make requests on
|> 	 an adjustable."
|> 
|> When I first made and ran the program, and before I closely studied
|> the code, I reasoned that the large color patch would be an Adjustable
|> (or be a component of an Adjustable) and that the 3 scrollers would be
|> Adjustors. Upon receiving the adjust message, this object would
|> then update its view (the color patch) and the numerical readout.
|> 
|> But I was dumbfounded to see that the ColorViewer and the ValuatorView
|> were Adjusters, even though they don't "make requests on an adjustable"
|> as the manual says.

It doesn't make sense for the ColorViewer to be an Adjustable, as it is not
adjusted directly.  The ColorViewer is really an aggregate of 3 adjustables,
one for each color space (red, green, blue).  Because the aggregate displays
the combination of the three, it observes the 3 adjustables.  I believe this example
was written before Adjuster was derived from Observer.  Perhaps now ColorViewer
could simply be an Observer.
Technical Details
Message-ID: <pjisqhk@fido.asd.sgi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!sgiblab!sgigate!odin!fido!marktwain.rad.sgi.com!linton
References: <PSHANNON.92Sep7172913@iapetus.cv.nrao.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!darwin.sura.net!sgiblab!sgigate!odin!fido!marktwain.rad.sgi.com!linton
From: linton@marktwain.rad.sgi.com (Mark Linton)
Subject: Re: examples/cedit, and a modest proposal
Message-ID: <pjisqhk@fido.asd.sgi.com>
Sender: news@fido.asd.sgi.com (Usenet News Admin)
Reply-To: linton@marktwain.rad.sgi.com (Mark Linton)
Organization: sgi
References:  <PSHANNON.92Sep7172913@iapetus.cv.nrao.edu>
Distribution: comp
Date: Tue, 8 Sep 1992 16:11:32 GMT
Lines: 38