[Pythonmac-SIG] newbie question 2
Tom Elliott
telliott at hsc.wvu.edu
Mon Nov 7 18:06:45 CET 2005
When a button is pushed and "draw_" is called, I expect drawRect_ to
be called through self.setNeedsDisplay_, but this doesn't work.
Why is that? Thanks.
Tom Elliott
# inherits from NSView via the nib
class MyView(NibClassBuilder.AutoBaseClass):
def initWithFrame_(self, frame):
super(MyView, self).initWithFrame_(frame)
return self
def drawRect_(self, rect):
NSLog("drawRect_")
NSColor.redColor().set()
NSRectFill(self.bounds())
def draw_(self,sender):
NSLog("draw_")
self.setNeedsDisplay_(True)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20051107/84eaa697/attachment.html
More information about the Pythonmac-SIG
mailing list