Re: [Perl-widget-developer] Widget display/html output method name
Status: Alpha
Brought to you by:
spadkins
From: Issac G. <ne...@wr...> - 2001-06-03 18:50:33
|
I'll second "render"... Issac ----- Original Message ----- From: "Gunther Birznieks" <gu...@ex...> To: <Per...@li...> Sent: Sunday, June 03, 2001 17:38 Subject: [Perl-widget-developer] Widget display/html output method name > At 02:17 PM 6/3/01 +0200, Issac Goldstand wrote: > > > > > I would like to open up the debate about the use of 'display' or 'html' > > > again. I am wondering about the possibility of confusion between > > > 'displaying' the code that generates the widget, and 'displaying' the > > > value of the widget. Also, display() seems to imply a print. What if we > > > got rid of both html() and display() and used draw() or render() for > > > generating the code, and leave value() as it is. Or, if you want, you can > > > shoot me for opening up this can of worms again :) > > > > > > >How about activate() or something else that can generically describe the > >Widget... Theoretically, we could creaate a Timer widget (that does some > >event after a certain time elaplses). In such a case, words like "display" > >"draw" or "render" don't make sense... Of course, we're not really > >"activating" the widgets either, as we're creating them on-the-fly in the > >target environment (e.g., HTML), but my personal hilosophy when designing > >"thing"s to be used by developers is to try to pick names for methods and > >properties that are easy to understand and _make sense_... They'll > >appreciate it. > > I agree that display, draw or render seems quite active as if to imply > print. But these are fairly standard (especially draw) in GUI systems. The > fact that a component is draw() was called doesn't actually mean it is > displayed. In some cases, the draw can be just placed on a backend bitmap > which will never display (double buffering). > > I dislike the name draw because it has a connotation of raw bitmaps (like > drawing programs). > > By far, the best method name I have seen is render. It is semantically > accurate. The widget is being rendered but it's not being displayed. > > Activate is one that I dislike because it implies you do it once or implies > a state change (active/inactive). This is not true. There is a distinct > value being returned when render() would be called. > > Later, > Gunther > > > _______________________________________________ > Perl-widget-developer mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-widget-developer > |