Re: [Anygui-devel] Another API question
by Just van Rossum other posts by this author
Jul 23 2001 7:47AM messages near this date
Re: [Anygui-devel] Progress
|
Re: [Anygui-devel] Another API question
[me]
> > Compare:
> >
> > aButton = Button(...)
> > aWindow.add(button)
> > self.aButton = button
> >
> > with:
> >
> > aWindow.aButton = Button(...)
[Greg Ewing]
> Do you mean that simply assigning something which is a
> widget to an instance variable of a container should
> automagically make it a subwidget of the container?
Yup. (In my system all attributes are either widgets or _private attrs.)
> I don't like that at ALL!
:-( I think it's very convenient and beautiful. Yes there's *some* magic to it,
but that's mostly a matter of implementation. API-wise it feels very natural, as
it show clearly what happens: you build a tree of widgets. Simple, effective.
> What's more, usually you're going to be using the
> place() method to specify the positioning of the
> widget, so you won't gain anything.
I don't know what the place method does: I don't have one. In my system you
specify geometrics as the first argument of any widget's __init__. My geometry
system is quite primitive, so maybe there's a class of things that can't be done
-- I'd be interested to learn what.
Just
_______________________________________________
Anygui-devel mailing list
Anygui-devel@[...].net
http://lists.sourceforge.net/lists/listinfo/anygui-devel
Thread:
Just van Rossum
Greg Ewing
Thomas Heller
Just van Rossum
|