Re: optional policy

Magnus Lie Hetland <[email protected]> Sun, 17 Nov 2002 19:52:30 +0100
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
Dallas Johnston <[email protected]>:
>
[snip]
> I agree. I've always agreed here. But I also thought that it would
> be cool to let the developer decide which to use, like in the case
> of AnyguiOpenFileDialog. Some people may find that they want
> consistency across backends, as opposed to having the layout of the
> dialog change on every platform.

How about this: We create a new partial back-end, called "genericgui"
or something, and putt the fallback stuff there... Then a developer
could (e.g.) do:

  from anygui import *
  from anygui.backend.genericgui import OpenFileDialog

Or?

[snip]
> >I'm not against the possible generic things, I just think they shouldn't
> >be part of the default anygui only the abstract part should normally be
> >generic. That will encourage the backends to support the proper front
> >end.

I think that sounds very reasonable.

> I believe this is exactly what I am talking about. Again, and
> forgive the belabouring here, doing with *Dialogs as I did with
> ComboBox, only allowing the user to choose dialog version via class
> name, not an __init__ parameter.  This type of change would only
> literally take a few minutes to setup.

Right. I don't think we should use an __init__ parameter to choose the
class. Doesn't feel right. Using a separate namespace (either putting
things in a separate module/package or naming them differently) sounds
better.

Though if we name them differently, my first thought would be to name
them something like GenericOpenFileDialog or something, since all the
classes (including those using native wrappers) are Anygui classes...

No real biggie for me, though.

> --Dallas

-- 
Magnus Lie Hetland        Practical Python          The Anygui Project
http://hetland.org        http://ppython.com        http://anygui.org


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html