views:

9

answers:

0

The following code which worked fine under OS X 10.5 now fails on 10.6:

    @IBAction
def addButton_(self, sender):
    panel = NSOpenPanel.openPanel()
    panel.setCanChooseDirectories_(YES)
    panel.setAllowsMultipleSelection_(YES)
    try:
        panel.beginSheetForDirectory_file_modalForWindow_modalDelegate_didEndSelector_contextInfo_(self.directory, None, NSApp().mainWindow(), self, 'openPanelDidEnd:panel:returnCode:contextInfo:', None)
    except:
        pass

@AppHelper.endSheetMethod
def openPanelDidEnd_panel_returnCode_contextInfo_(self, panel, returnCode, contextInfo):

The error I get is:

objc.BadPrototypeError: Python signature doesn't match implied Objective-C signature for <unbound selector openPanelDidEnd:panel:returnCode:contextInfo: of controller at 0x6166a70>