From: David Vallner Date: 2007-03-04T02:48:24+09:00 Subject: Re: Gui Builders for Ruby --------------enig36913D30E7BE3027C9FFF772 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Kyle Schmitt wrote: > Reading the tutorials for the GUI toolkits, and > the tutorial for foxguib, it appears the idea is make you GUI, then > have your classes inherit the GUI class. I'd presume it looks so scary because doing a layered design is outside of the scope of those tutorials. Usually in my Qt code, I inherit from the GUI class into a class that only handles the mapping of low-level GUI events into a separate layer of logic actions. This gives you an extra level of indirection that lets you reuse the same UI code for let's say a form-input and a read-only variant of the same GUI, but there's nothing forcing you to put -all- your logic into that layer. (It's just much simpler in introductory tutorials - you have to admit that a clean, layered design usually takes a while to wrap your head around.) David Vallner --------------enig36913D30E7BE3027C9FFF772 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFF6bTcy6MhrS8astoRAgyVAJ9egnu0/YJcgBEmq2A/pGP2KWjVNACfVNkq rtWaNfTn6COequKQJJRE8Cs= =wD+h -----END PGP SIGNATURE----- --------------enig36913D30E7BE3027C9FFF772--