[Pyobjc-dev] __dict__?
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2003-10-23 17:45:41
|
http://www.pobox.com/~adamf/software/PyUMLGraph (graphviz installs fine via Fink, btw.) I was playing with PyUMLGraph (cool stuff) and ran it against a PyObjC example. It breaks with the following which raises the question as to whether or not we should have a __dict__ attribute on the Python side of the bridge and, if so, what it should be populated with. [administrators-computer:sourceforge/pyobjc/Examples] bbum% pyumlgraph --types --nodefillcolor="#ffcc19" -o subclassing-objective-c.dot subclassing-objective-c.py <native-selector alloc of <objective-c class Demo at 0x325020>> Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/Current/bin/ pyumlgraph", line 139, in ? main() File "/System/Library/Frameworks/Python.framework/Versions/Current/bin/ pyumlgraph", line 126, in main umlGrapher.run('execfile(' + `progname` + ')') File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/UmlGrapher.py", line 16, in run exec cmd in dict, dict File "<string>", line 1, in ? File "subclassing-objective-c.py", line 31, in ? x = Demo.alloc().init() File "subclassing-objective-c.py", line 15, in init def init(self): File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/InfoCollector.py", line 48, in globalTrace self.collectInfo(frame, event, arg) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/InfoCollector.py", line 65, in collectInfo self.collectInfoForClass(className, frame, event, arg) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/InfoCollector.py", line 82, in collectInfoForClass classInfo.collectInfo(frame, event, arg) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/ClassInfo.py", line 53, in collectInfo self.selfReferences.collectInfo(frame, event, arg) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/SelfReferencesGatherer.py", line 17, in collectInfo attributes = self.getInstanceAttributes(frame.f_locals["self"]) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/PyUMLGraph/Gatherer.py", line 36, in getInstanceAttributes return object.__dict__ AttributeError: 'Demo' object has no attribute '__dict__' |