Class: CcMessageBox
- Defined in:
- lib/flex_cocoa/cc_message_box.rb
Instance Attribute Summary
Attributes inherited from FlexCocoa
Instance Method Summary collapse
-
#initialize(title, subtitle, message, r_button, m_button = nil, l_button = nil) ⇒ CcMessageBox
constructor
A new instance of CcMessageBox.
Methods inherited from FlexCocoa
#button_response, #buttons_template, #parts_init, #post_initialize, set_path
Constructor Details
#initialize(title, subtitle, message, r_button, m_button = nil, l_button = nil) ⇒ CcMessageBox
Returns a new instance of CcMessageBox.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/flex_cocoa/cc_message_box.rb', line 9 def initialize (title, subtitle, , , = nil, = nil) super() @exec << " msgbox" @exec << " --title \"#{title}\" --text \"#{subtitle}\"" @exec << " --informative-text \"#{}\"" @exec << " --button1 \"#{}\"" @exec << " --button2 \"#{}\"" unless .nil? @exec << " --button3 \"#{}\"" unless .nil? post_initialize response = @stdout.read.strip @output = response.to_i - 1 end |