app/main_controller.rb
def choose_watch_folder(prompt = 'Watch', message = nil)
    panel = NSOpenPanel.openPanel
    panel.canChooseDirectories  = true
    panel.canChooseFiles        = false
    panel.prompt                = prompt
    panel.message               = message if message

    result = panel.runModal
    return result == NSFileHandlingPanelOKButton ? panel.URLs[0] : nil
  end
# open panel to allow them to choose a folder to add as a source
#------------------------------------------------------------------------------
open panel to allow them to choose a folder to add as a source
open panel to allow them to choose a folder to add as a source
def choose_watch_folder(prompt = 'Watch', message = nil)
    panel = NSOpenPanel.openPanel
    panel.canChooseDirectories  = true
    panel.canChooseFiles        = false
    panel.prompt                = prompt
    panel.message               = message if message
    result = panel.runModal
    return result == NSFileHandlingPanelOKButton ? panel.URLs[0] : nil
  end
def choose_watch_folder ( prompt = 'Watch' , message = nil ) panel = NSOpenPanel . openPanel panel . canChooseDirectories = true panel . canChooseFiles = false panel . prompt = prompt panel . message = message if message result = panel . runModal return result == NSFileHandlingPanelOKButton ? panel . URLs [ 0 ] : nil end
open panel to allow them to choose a folder to add as a source
open panel to allow them to choose a folder to add as a source
prompt
message