Re: [Pyobjc-dev] How do I get NSTimer to call a python method?
Brought to you by:
ronaldoussoren
From: Kevin M. <kev...@ma...> - 2003-06-25 18:26:47
|
On Wednesday, June 25, 2003, at 08:39 AM, bb...@ma... wrote: > (Sorry for the faulty repeat of Ronald's followup -- I'm on a > ****slow**** connection.) > > First, change the class name 'ircController' to 'IRCController' -- it > follows the Obj-C pattern and will reduce confusion (in that > ircController in the code below really should be ircController). > > I also noticed that you are using multiple inheritance... > > class ircController(NibClassBuilder.AutoBaseClass, irclib.irc): > > .... but are initializing the irclib stuff in your connect method ... > > def connect_(self, sender): > irclib.irc.__init__(self) > > ... and would suggest an implementation pattern change to make the > code fall more in line with Model-View-Controller. Specifically, > create an instance of irclib.irc and store it as an instance variable > within your IRCConnection instance. > > If the end result works-- it should just as what you tried by adding > the argument should work (I think)-- then there would appear to be a > bug in the bridge related to multiple inheritance? > I'll try that, but that ends up with them both having pointers to each other, as the irc piece needs to call back into the Cocoa piece to show IRC messages. |