Displaying message boxes
To display a message in a message box, first get the message object, and then send it the display message. Here's an example of code you might use and the message box that it displays:
(self getMRI: MsgNoName "or getMri: 1"
group: #AddressMsgs) display.

MsgNoName dialog
For your own applications, replace MsgNoName (or 1) with the message number constant of your message, and replace AddressMsgs with the pool dictionary name that you specified in the NLS Workspace - Indexed Messages window.
Tip icon
To quickly see what a message box looks like, try one of the following options:
Open an inspector on your application, and then evaluate the code used to display the message in the inspector's value pane.
Add a script such as the following to your application:
myMessage
(self getMRI: <message constant name or number>
group: #<group (pool) name>) display.
If myMessage is not in a class that has <group (pool) name> in its list of pool dictionaries, <message constant name or number> should name the pool dictionary, followed by :: and then the constant name. For example, it should use a format similar to the following:
myMessage
(self getMRI: AbtMsgBase::MsgBaseUnacceptableInputObject
group: 'AbtMsgBase') display.
Next, add a push button to a view in your application and connect the clicked event of the push button to the script myMessage. When you test the view and select the push button, the message box opens.
Last modified date: 05/14/2020