Created
December 15, 2012 01:14
-
-
Save pnlybubbles/4290212 to your computer and use it in GitHub Desktop.
SheetDialogのテスト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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