Skip to content

Instantly share code, notes, and snippets.

@pnlybubbles
Created December 15, 2012 01:14
Show Gist options
  • Save pnlybubbles/4290212 to your computer and use it in GitHub Desktop.
Save pnlybubbles/4290212 to your computer and use it in GitHub Desktop.
SheetDialogのテスト
#
# AppDelegate.rb
# DialogSheet
#
# Created by あわあわ on 12/12/15.
# Copyright 2012年 あわあわ. All rights reserved.
#
class AppDelegate
attr_accessor :window
attr_accessor :sheet
def applicationDidFinishLaunching(a_notification)
# Insert code here to initialize your application
end
def show_sheet(sender)
NSApp.beginSheet(sheet,
modalForWindow: window,
modalDelegate: self,
didEndSelector: nil,
contextInfo:nil)
end
def hide_sheet(sender)
NSApp.endSheet(sheet) # <=これって必要なの?
sheet.orderOut(sender)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment