class Test(object):
def connect(self ):
"""Connect to the remote host, returns deferred returning protocol"""
df = ncrprotocol.connectTCP( self.host, self.port )
def setProtocol(result):
self.protocol= result
return result
df.addCallback( setProtocol )
df.addCallback( self.authorizeProtocol )
return df
To reproduce, save given code in a file, add to a new project and select Project|Diagrams|Application Diagram .
Haven't spelunked too deeply in the code, looks like the "Method" group-handler needs to look to see if it's defining a nested function within a class' method to decide which class to use. Alternately, in the Attribute handler, search up the class-definition hierarchy looking for the nearest class. You should also guard against potential failures where self. is used in functions which aren't defined within a class (i.e. they are mixed into a class later):
def another( self ): self.x = 3
will cause the same problems for with the Application diagram as the previous example.
________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com
_______________________________________________ PyKDE mailing list [EMAIL PROTECTED] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde