Re: Re: [Anygui-checkins] CVS: anygui setup.py,1.9,1.10

Magnus Lie Hetland <[email protected]> Sat, 16 Nov 2002 15:58:19 +0100
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
Dallas Johnston <[email protected]>:
>
> Actually, I am just being lazy here. I was going to do it the
> parameter route, but I just didn't get around to changing it. But
> now that I think about it, the FileDialog base might work out better
> in the end.

Perhaps. Unless there are other uses than open/save -- but for
programs that do other things (e.g. "process file..." etc.) a
parameter-based version might be useful. But then again, that could
perhaps be done by instantiating the superclass? I don't know...

> For example, there are issues with what parameters go
> with which instance, and I don't like the **kwds magic all too much.
> Also, the widget setup will behave better polymorhpically.

Isn't this just a matter of making the various message strings
attributes of the Dialog objects? E.g:

  dlg = FileDialog()
  dlg.message = "Open file..."
  app.add(dlg)

would be equivalent to

  dlg = FileDialog(message="Open file...")
  app.add(dlg)

This is how everything else is handled...

On the other hand, if there are platform/back-end dependent strings in
use here, they should probably be left to the back-end, and instead of
using

  dlg = FileDialog(type=FileDialog.OPEN)

or some such terribleness <wink>, I think a specific subclass would be
better.

> Note that once I get the Layout stuff fixed in the ComboBox, I will
> use this for the filter.

Kewl :)

> Also, do you perhaps know a workaround for the Tkinter issue with
> not allowing more that one (text based) widget to have selected
> items? This really sucks for the dialog.

I don't -- sorry. Maybe Joe knows something? I must say that Tkinter
strikes me as odd in many ways... :]

> 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