Return to Snippet

Revision: 6629
at June 4, 2008 06:50 by dbug13


Updated Code
SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = ENV['DIALOG']

require SUPPORT + '/lib/escape'
require SUPPORT + '/lib/osx/plist'

title = "My Alert"
message = "This is my alert Box"
buttons = ['OK', 'Close']

params = {
    'alertStyle' => 'informational', 
    'messageTitle' => title, 
    'informativeText' => message, 
    'buttonTitles' => buttons
}

opts = params.to_plist

puts `#{e_sh(DIALOG)} -ep #{e_sh(opts)}`

Revision: 6628
at June 3, 2008 18:18 by dbug13


Updated Code
SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = ENV['DIALOG']

require SUPPORT + '/lib/escape'


title = "My Alert"
message = "This is my alert Box"
buttons = ['OK', 'Close']

params = {
    'alertStyle' => 'informational', 
    'messageTitle' => title, 
    'informativeText' => message, 
    'buttonTitles' => buttons
}

opts = params.to_plist

puts `#{e_sh(DIALOG)} -ep #{e_sh(opts)}`

Revision: 6627
at June 3, 2008 18:17 by dbug13


Initial Code
SUPPORT = ENV['TM_SUPPORT_PATH']
DIALOG = ENV['DIALOG']

require SUPPORT + '/lib/escape'


title = "My Alert"
message = "This is my alert Box"
buttons = ['OK', 'Close']

params = {
    'alertStyle' => 'informational', 
    'messageTitle' => title, 
    'informativeText' => message, 
    'buttonTitles' => buttons
}

opts = params.to_plist

puts `#{e_sh(DIALOG)} -ep #{e_sh(opts)}`

Initial URL


Initial Description


Initial Title
Displaying an alert box with TextMate's tm_dialog command

Initial Tags
textmate, ruby

Initial Language
Ruby