1.0.5 • Published 7 years ago

cocoadialog v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

cocoadialog

Node.js wrapper for cocoaDialog

Note: Issues with the actual cocoaDialog application should be filed in its issue queue.

Install

$ npm install --save cocoadialog

Basic Usage

const cocoaDialog = require('cocoadialog').setGlobalOption({
  stringOutput: true
});

cocoaDialog.msgBox()
  .setTitle('This is the title')
  .setIcon('caution')
  .setLabel('This is the label')
  .setButtons('Ok', 'Cancel', 'More')
  .open()
  .then(result => {
    if (result.button === 'Ok') {
      console.log('Ok button was clicked.');
    }
    else if (result.button === 'More') {
      console.log('More button was clicked.');
    }
  })
  .catch(result => {
    if (result.hasAborted()) {
      console.log('Cancel button was clicked.');
    }
    else {
      console.error(result.error);
    }
  });

Examples

API

API Documentation

License

MIT © Mark Carver

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago