On Sat, 17 Jan 2004 17:09:47 +0000, Phil Thompson <[EMAIL PROTECTED]> wrote:
> > qApp does *not* refer to the instance of my subclass. > > Sorry, I wasn't clear. They refer to the same C++ instance. Aha. Thanks for the clarification. > > That is exactly the case: that IWBNI the type of qApp were my > > subclass rather than qApplication. Perhaps this is a design > > flaw, but I decided to add some application-wide utility > > functions to my application subclass, mostly thin wrappers > > around "emit( PYSIGNAL( 'somesignal' ), *args )" sorts of > > utility functions. That way, I can reference them from > > anywhere as qApp.utilityfunction. > > I think it's better to use a separate myApp global that you set > in MyApp.__init__(). Otherwise you are just making your code > more difficult to understand. Yeah, you're right, a separate global (or two, or three...) is probably cleaner; I'll do it that way instead. I spent more than twenty years creating *structured* programs, these newfangled object oriented jobs still confuse me sometimes. ;-) Thank you for your replies. Regards, Dan -- I hear, and I forget. Dan Sommers I see, and I remember. [insert your own joke here] I do, and I understand. <mailto:[EMAIL PROTECTED]> -- Confucius <http://www.tombstonezero.net/dan/> _______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
