Re: question

"Samuele Pedroni" <[email protected]>
Newsgroups gmane.comp.python.anygui.devel
Message-ID <003101c25276$2b57fb40$6d94fea9@newmexico>
From: Joseph A. Knapka <[email protected]>
> Samuele Pedroni wrote:
> >
> > Yes, this stuff need some rethinking.
> >
> > For the moment I think it allows to write:
> >
> >    isDummy(self.widget.parent)
>
> But if self.widget is None, a perfectly reasonable possibility,

but the whole point of DummyWidget is not to have that happen

> then you have to catch the AttributeError.

maybe a non-dummy widget could not have the parent attr,  that depends on the
context.

DummyWidget is a rather implicit mechanism that let write natural code as long
as one knows what behind the scene is allowing for that. OTOH is copy-&-past
and random code inspection unfriendly. Checking for exceptions that it should
avoid make things even more obscure.

Either it is used at its "maximal potential" and very prominently documented,
or a more explicit way is better, given how anygui
grows (want to implement this in backend B, check how backend A does it).

regards.






-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.