The nwcui Package

The nwcui package can only be used while running within an object's create and menuClick event methods.

The following are available:

askbox fontdlg msgbox prompt

Package Details

nwcui.askbox(msg, [msgtitle, flags]), Returns # or nil

This is used to ask the user a yes or no question.

Returns 1 for Yes and 0 for No.

User cancel returns nil. No further action should be taken by the script.


nwcui.msgbox(msg, msgtitle), Returns 1 or nil

Issues a message to the user with a standard message box.

Returns 1 during normal operation.

The user is given the opportunity to cancel the current operation, which results in nil being returned. No further action should be taken by the script when this is returned.


nwcui.prompt(msg, [datatype, [list-values]], [default]), Returns Data or nil

Prompts the user for additional information. The user is given the opportunity to respond to the prompt, or cancel.

Parameters:

Paramater Description
msg the message text to issue to the user
datatype the kind of control/data that is expected (optional, default="*")
listvals the '&' multiple select list requires this extra parameter (required for '&' prompts)
default the default data if the user simply accepts the prompt

Supported datatype strings:

The user is given the opportunity to cancel the current operation, which results in nil being returned. No further action should be taken by the script when this is returned.


nwcui.fontdlg('Typeface',#size,'Style'), Returns 'Typeface',#size,'Style' or nil

Shows a font dialog to the user. A font's typeface, size and style are accepted on input, and returned on output (when confirmed by the user).

The return Size parameter is 25% of the point size requested by the user. The style string is suitable for use in nwcdraw.setFont.

Copyright © 2019 NoteWorthy Software™, Inc.
All Rights Reserved.