[Pyobjc-dev] How to return an NSRect without crashing the bridge.
Brought to you by:
ronaldoussoren
|
From: Ian B. <ian...@ya...> - 2008-12-20 18:23:38
|
I'm doing some exploratory coding with subclassing NSOutlineView.
I want to override a method from NSView so I tried the code:
from Foundation import *
from AppKit import *
from PyObjCTools import NibClassBuilder
class CrimsonOutlineView(NibClassBuilder.AutoBaseClass):
# NSView
def adjustScroll_(self, proposedRect):
returnVal = super(CrimsonOutlineView, self).adjustScroll_(proposedRect)
print str(self)+" proposedRect_("+str(proposedRect) +") returns "+str(returnVal)
return returnVal
Pretty simple it just passes everything and prints the results to the console. But this causes a hard crash.
I know this has to do with NSRect being a basic struct and not an NSObject but I have no idea how to make it work.
Many thanks in advance and warm regards,
IBloom
|