For sure, that sounds like a very logical way of doing things.

Here is my code to call the sheet...


  def displaySheet(sender)
    NSLog('opening sheet')

  NSBundle.loadNibNamed_owner('Prefs', self)
  NSApp.beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo(@prefsWindow, 
@mainWindow, nil, 'didEndSheet:returnCode:contextInfo', nil)

  # creates modal session, sheet is displayed at this point
  NSApp.runModalForWindow(@prefsWindow)

  NSApp.endSheet(@prefsWindow)
    #@prefsWindow.orderOut(self)
  end

  def didEndSheet_returnCode_contextInfo(sheet, returnCode, context)
    NSLog('callback')
  @prefsWindow.orderOut(self)
  end

But now, with the callback signiture in, it crasheses when ever it goes 
to close the sheet? I have played around with it and it just bongs out 
whatever you seem to do?

Any ideas?

Cheers

Tim

-- 
Posted via http://www.ruby-forum.com/.