Re: [Pyobjc-dev] How do I get NSTimer to call a python method?
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-06-26 08:15:00
|
On Wednesday, Jun 25, 2003, at 20:26 Europe/Amsterdam, Kevin Marks wrote: > > 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) I completely missed the MI stuff when I first looked at this. You shouldn't use MI with Cocoa classes, I'm actually suprised that this works at all as your supposed to get an exception when you use multiple inheritance. I guess I'll have to add a unittest and some documentation for this. The reason I don't want to allow multiple inheritance is twofold. First of all I want to keep 'Cocoa in Python' close to 'Cocoa in Objective-C' to make it easier to use existing Cocoa documentation. Furthermore, I haven't checked yet what I'd have to implement to cleanly support MI inherentence from Cocoa classes. This is harder than it might look, because we create "real" Objective-C classes. One other thing, if you call 'objc.setVerbose(1)' at the start of you script you'll get a traceback in the Console whenever PyObjC translates an exception from Python to Objective-C. That should give you some additional information that might allow you to pinpoint the problem your having. Ronald |