Source/ui/UI.js
/**
 * Show a small, temporary, message to the user.
 * The message appears at the bottom of the selected document,
 * and is visible for a short period of time. It should consist of a single
 * line of text.
 *
 * @param {string} text The message to show.
 * @param [Document] document The document in which we will show the message
 */
Show a small, temporary, message to the user.
The message appears at the bottom of the selected document,
and is visible for a short period of time. It should consist of a single
line of text.

@param {string} text The message to show.
@param [Document] document The document in which we will show the message
Show a small temporary message to the user . The message appears at the bottom of the selected document and is visible for a short period of time . It should consist of a single line of text . @param { string } text The message to show . @param [ Document ] document The document in which we will show the message
function message(text, document) {
  if (!document) {
    NSApplication.sharedApplication()
      .orderedDocuments()
      .firstObject()
      .showMessage(text)
  } else if (isNativeObject(document)) {
    document.showMessage(text)
  } else {
    document.sketchObject.showMessage(text)
  }
}
function message ( text , document ) { if ( ! document ) { NSApplication . sharedApplication ( ) . orderedDocuments ( ) . firstObject ( ) . showMessage ( text ) } else if ( isNativeObject ( document ) ) { document . showMessage ( text ) } else { document . sketchObject . showMessage ( text ) } }
Show a small, temporary, message to the user.
Show a small temporary message to the user .