Imports in DWT
Jesse Phillips
jessekphillips at gmail.com
Tue Feb 26 15:35:47 PST 2008
On Tue, 26 Feb 2008 15:10:57 +0100, Frank Benoit wrote:
> I wonder what is the best import strategy for DWT. Well, i know there is
> no single "right way". So what are your thoughts?
>
> 1. import everything explicitely
>
> 2. have a dwt.all module that imports really all
>
> 3. have groups import modules aka tango
>
> 4. publically import all types used in the API of a widget.
> So dwt.Button would publically import:
> - dwt.DWT
> - dwt.widget.Control
> - dwt.widget.Composite
> - dwt.events.SelectionListener
> - dwt.graphics.Point
> - dwt.graphics.Image
>
>
> 5. publically import API types, but only manually picked ones
> dwt.layout.GridLayout:
> - dwt.layout.GridData
> dwt.Button:
> - dwt.DWT
> - dwt.events.SelectionListener
I like the idea of option 5. The reason for this is when you import a
module there are things that are most likely going to imply another
import to use it. Where if you do 4 there are things that may or may not
be used. Mixing this with groups might also be good. I think the all
option might be just a little too much (then again it would make
translating those * easier).
More information about the Digitalmars-d-dwt
mailing list