From: tmoran@acm.org
Subject: Re: Event mechanisms for GUI's
Date: Tue, 26 Sep 2006 18:18:10 -0500
Date: 2006-09-26T18:18:10-05:00 [thread overview]
Message-ID: <bcidnfgI3ZqvKITYnZ2dnUVZ_qWdnZ2d@comcast.com> (raw)
In-Reply-To: 3egSg.208528$1i1.141541@attbi_s72
> There's nothing wrong with case statements. They're very clear and easy
In small quantity, yes. But many-branched, nested, case statements with
a lot of near duplication are not so clear or maintainable. They are
a very low abstraction level, computer-centric, device.
If This_Window is for showing danger warnings in big red letters to the
reactor operator, and That_Window is for showing daily power demand over
the last month, a mouse click in either is similar from a computer-centric
view, but vastly different in the problem space. Having This_Window_Type
objects and That_Window_Type objects as descendants of Basic_Window_Type
(inheriting what they have in common) makes them different objects, and a
dispatching call on When_Left_Button_Down(The_Clicked_Window) is in effect
a succinct abbreviation for a case statement on the type of Window,
implemented efficiently and without forgetfullness or typing errors,
automatically by the compiler.
next prev parent reply other threads:[~2006-09-26 23:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 17:28 Event mechanisms for GUI's Lucretia
2006-09-26 20:39 ` Jeffrey R. Carter
2006-09-26 23:18 ` tmoran [this message]
2006-09-27 3:02 ` Jeffrey R. Carter
2006-09-27 4:26 ` tmoran
2006-09-27 5:39 ` Jeffrey R. Carter
2006-09-27 6:21 ` Lucretia
2006-09-27 21:29 ` Jeffrey R. Carter
2006-09-27 23:05 ` Randy Brukardt
2006-09-28 3:47 ` Jeffrey R. Carter
2006-09-28 4:15 ` tmoran
2006-09-29 3:16 ` Randy Brukardt
2006-10-14 19:25 ` Lucretia
2006-10-15 1:22 ` Jeffrey R. Carter
2006-10-15 2:29 ` Lucretia
2006-10-16 4:11 ` Jeffrey R. Carter
2006-10-19 14:22 ` Lucretia
2006-10-19 15:04 ` Dmitry A. Kazakov
2006-10-19 20:18 ` Jeffrey R. Carter
2006-10-19 21:51 ` Lucretia
2006-10-19 22:01 ` Lucretia
2006-10-20 4:48 ` Jeffrey R. Carter
2006-10-15 13:53 ` Ed Falis
2006-10-16 4:19 ` Jeffrey R. Carter
2006-10-14 19:44 ` Lucretia
2006-09-27 8:10 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox