[Pyobjc-dev] beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ problem
Brought to you by:
ronaldoussoren
From: Mathieu L. <ze...@ne...> - 2004-01-25 19:14:50
|
i've got some trouble with alert sheet. here is my code : def foo_(self,alert,code,context): print "bar" def boxDelete_(self,sender): alert = NSAlert.alloc().init() alert.addButtonWithTitle_("OK") alert.addButtonWithTitle_("Cancel") alert.setMessageText_("Delete") alert.setInformativeText_("wanna delete?") alert.setAlertStyle_(NSWarningAlertStyle) #q = alert.runModal() s = AppHelper.endSheetMethod(self.popo_) alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ (self.window(),self,s,0) And here is my error : alert.beginSheetModalForWindow_modalDelegate_didEndSelector_contextInfo_ (self.window(),self,s,0) TypeError: Need 6 arguments, got 4 in the official documentation for beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo: at http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/Tasks/ UsingAlertSheets.html#//apple_ref/doc/uid/20001045/BABFIBIA , there is only 4 arguments? it was working (a bit) with pyobjc from the 1.0 dmg, but with the CVS version, there is this 6 arguments error. Where is the mistake? M. |