#1501: NSBeginAlertSheet call gives unknown: [BUG] unknown Objective-C immediate: 0x1 (nil) ----------------------------------+----------------------------------------- Reporter: benmorgan2@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Calling NSBeginAlertSheet will crash the application with [BUG] unknown Objective-C immediate: 0x1 (nil) when any button apart from the 'cancel' button is pressed. The following code reproduces the error: {{{ class AppDelegate def applicationDidFinishLaunching(notification) NSBeginAlertSheet(nil, 'Default', 'Cancel', 'Alternate', $window, self, :'alertDidEnd:returnCode:contextInfo:', nil, nil, '') end def alertDidEnd(sheet, returnCode:rCode, contextInfo:cInfo) p sheet, rCode, cInfo end end app = NSApplication.sharedApplication app.delegate = AppDelegate.new $window = NSWindow.alloc.initWithContentRect([300, 200, 500, 300], styleMask:NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask, backing:NSBackingStoreBuffered, defer:false) $window.level = NSModalPanelWindowLevel $window.delegate = app.delegate $window.display $window.orderFrontRegardless app.run }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1501> MacRuby <http://macruby.org/>