Re: [Anygui-checkins] CVS: /anygui TODO.txt,1.57,1.58

Alex Martelli <[email protected]> Sat, 2 Nov 2002 18:18:17 +0200
Newsgroups gmane.comp.python.anygui.devel
Organization None in Sight
Message-ID <[email protected]>
On Saturday 02 November 2002 05:12 pm, Magnus Lie Hetland wrote:
> Joseph A Knapka <[email protected]>:
> > Magnus Lie Hetland wrote:
> > >  * Add test suite for Rectangles.py. Change calls to self.set to
> > >!   self.modify to correctly interact with models.
> >
> > It seems that Application ought to be a Borg or a Singleton - then
> > all windows can just call Application() to get the application,
> > and the user needn't be bothered about when to create an Application
> > object. (They'd still have to call Application().run(), though.)
>
> Yes... I recall discussing this option before (making Application a
> Borg). I have found some posts about it, but can't find any arguments
> against it. It sure sounds very natural to me.
>
> Anyone have opinions in the matter? Alex, you're the Borg man -- what
> do you think?

I think it's a good idea, though I haven't thought all that deeply
about it.  If the Application class has methods that the user may
want to override, and which need to be called back from .run or
the like (but I can't think of any right now), then a bit of care is
needed to make sure the right subclass of Application is used --
it's mostly a question of documenting things carefully for what is
sure to be an advanced/marginal need, anyway.  I can't see any
advantage to Singleton over Borg, in general, nor, in this specific
case, can I see any use for having multiple independent instances
of Application or subclasses thereof.


Alex


-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en