     throw new TypeError('Need Window object') unless window.constructor is BrowserWindow
 
     options = {} unless options?
-    options.type = options.type ? module.exports.MESSAGE_BOX_NONE
-    throw new TypeError('Invalid message box type') unless 0 <= options.type <= 2
+    options.type = options.type ? 'none'
+    options.type = messageBoxTypes.indexOf options.type
+    throw new TypeError('Invalid message box type') unless options.type > -1
 
     throw new TypeError('Buttons need to be array') unless Array.isArray options.buttons
 

                        options.defaultExtension,
                        callbackId

module.exports =
  openFolder: (args...) ->
    selectFileWrap args..., 1, 'Open Folder'

                           String(options.title),
                           String(options.message),
                           String(options.detail)
