<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=POPUP</id>
	<title>POPUP - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=POPUP"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=POPUP&amp;action=history"/>
	<updated>2026-04-12T12:25:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=POPUP&amp;diff=720&amp;oldid=prev</id>
		<title>ConvertBot: Creates a pop-up window.</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=POPUP&amp;diff=720&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:36Z</updated>

		<summary type="html">&lt;p&gt;Creates a pop-up window.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Creates a pop-up window.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;RESULT&amp;gt;   - The result name in which to capture the user's input. [DEF=&amp;lt;null&amp;gt;]&lt;br /&gt;
&amp;lt;FUNC&amp;gt;     - The name of the pop-up function. See FUNCTIONS below. [DEF=YESNO]&lt;br /&gt;
&amp;lt;MESSAGE&amp;gt;  - The message to prompt the user with.               [DEF=&amp;quot;A Popup&amp;quot;]&lt;br /&gt;
&amp;lt;TYPE&amp;gt;     - The type of popup message (ERR,INFO,WARN,QUEST,PLAIN) [DEF=PLAIN]&lt;br /&gt;
&amp;lt;OPTIONS&amp;gt;  - The options for a &amp;lt;FUNC&amp;gt;=Choice/Buttons/Mask          [Def=&amp;quot;&amp;quot;]&lt;br /&gt;
&amp;lt;DEFAULTS&amp;gt; - The default values for &amp;lt;FUNC&amp;gt;=Text/Mask/Login         [Def=&amp;quot;&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
Tag-only parameters:&lt;br /&gt;
[FILTER]  - The file name filter to use with the &amp;lt;FUNC&amp;gt;=FILE. [Def=&amp;quot;*&amp;quot;]&lt;br /&gt;
[AUXLIST] - The AUX list to show with the &amp;lt;FUNC&amp;gt;=FILE. [Def=AUX.READ]&lt;br /&gt;
[PATHOPT] - The output option for including the path when&lt;br /&gt;
            &amp;lt;FUNC&amp;gt;=FILE is used. [Def=AuxQual]&lt;br /&gt;
FullPath  - Display full path to file&lt;br /&gt;
NoPath    - Display filename without path&lt;br /&gt;
AuxPath   - Display &amp;quot;&amp;lt;aux&amp;gt;/&amp;lt;file&amp;quot;&lt;br /&gt;
AuxQual   - Display &amp;quot;&amp;lt;file{AUX=&amp;lt;aux&amp;gt;}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This command creates different types of pop-up windows through an easy-to-use&lt;br /&gt;
interface to Java's JOptionPane class and the related Swing pop-ups.  This is&lt;br /&gt;
intended for use by macros only. Primitives should use the Swing classes&lt;br /&gt;
directly.&lt;br /&gt;
&lt;br /&gt;
For all functions, if the user chooses &amp;quot;Cancel&amp;quot; or closes the pop-up window&lt;br /&gt;
without selecting an option the result &amp;lt;RESULT&amp;gt; will be set to &amp;quot;CANCEL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;TYPE&amp;gt; determines how the message is handled (and more specifically defines&lt;br /&gt;
the icon used). Use TYPE=&amp;quot;PLAIN&amp;quot; to get an &amp;quot;undecorated&amp;quot; (no icon) message.&lt;br /&gt;
The available types are:&lt;br /&gt;
  TYPE=&amp;quot;ERRor&amp;quot;       The message is an error message.&lt;br /&gt;
  TYPE=&amp;quot;INFOrmation&amp;quot; The message is an info message.&lt;br /&gt;
  TYPE=&amp;quot;WARNing&amp;quot;     The message is a warning message.&lt;br /&gt;
  TYPE=&amp;quot;QUESTion&amp;quot;    The message is a question.&lt;br /&gt;
  TYPE=&amp;quot;PLAIN&amp;quot;       Do not use one of the above types.&lt;br /&gt;
&lt;br /&gt;
The uppercase letters in &amp;lt;TYPE&amp;gt; names indicates minimum required text.&lt;br /&gt;
&lt;br /&gt;
  +--------------------------------------------------------------------------+&lt;br /&gt;
  | Note: In NeXtMidas 2.2.0 the POPUP intrinsic was moved from UCL to SYS.  |&lt;br /&gt;
  |       In NeXtMidas 2.3.0 the POPUP intrinsic was converted to a primitive|&lt;br /&gt;
  |       so it could be used in a non-blocking context. This explain file   |&lt;br /&gt;
  |       documents the post-2.3.0 functionality. While the new version of   |&lt;br /&gt;
  |       POPUP is backwards-compatible, macros that use the new features    |&lt;br /&gt;
  |       (including /BLOCKING=, /WPOS=, messages, &amp;lt;FUNC&amp;gt;=Login/Mask/Alert   |&lt;br /&gt;
  |       /Buttons, default values, etc.) will not run properly in old       |&lt;br /&gt;
  |       versions of NeXtMidas.                                             |&lt;br /&gt;
  +--------------------------------------------------------------------------+&lt;br /&gt;
&lt;br /&gt;
FUNCTIONS:&lt;br /&gt;
  BUTTONS     - Creates a popup with a set of buttons. &amp;lt;OPTIONS&amp;gt; is a comma-&lt;br /&gt;
                separated list of button names. The name of the button pressed&lt;br /&gt;
                will be put into result &amp;lt;RESULT&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  CHOICE      - Creates a choice pop-up window where the user can choose between&lt;br /&gt;
                a given set of choices &amp;lt;OPTIONS&amp;gt;. The user's entry will be put&lt;br /&gt;
                into result &amp;lt;RESULT&amp;gt;. (&amp;lt;OPTIONS&amp;gt; is a comma-separated list of&lt;br /&gt;
                options.)&lt;br /&gt;
&lt;br /&gt;
  COLOR       - Creates a color-selection window where the user can choose a&lt;br /&gt;
                color from a palate. The hex value of the color will be placed&lt;br /&gt;
                into result &amp;lt;RESULT&amp;gt; (in 0x+Alpha+RGB format).&lt;br /&gt;
&lt;br /&gt;
  FILE        - Same as &amp;lt;FUNC&amp;gt;=&amp;quot;FILE/M&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  FILE/J      - TBD: A Java-friendly file selection box where the user can&lt;br /&gt;
                choose a file from the popup. This differs from FILE/M in&lt;br /&gt;
                that it only supports files on the local file system. If&lt;br /&gt;
                [PATHOPT] is specified, it must be equal to &amp;quot;FullPath&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  FILE/M      - A Midas-friendly AUX-aware file selection box where the user&lt;br /&gt;
                can choose a file from the popup.&lt;br /&gt;
&lt;br /&gt;
  LOGIN       - Brings up a login window which prompts for user ID and password.&lt;br /&gt;
                &amp;lt;DEFAULTS&amp;gt; can be used to set a default value for the user ID.&lt;br /&gt;
                A string will be returned in table form with the values input&lt;br /&gt;
                (&amp;quot;{USER=&amp;lt;user&amp;gt;,PASS=&amp;lt;pass&amp;gt;}&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
  MASK/S      - Creates a popup with a set of check boxes for a user to select&lt;br /&gt;
                from. &amp;lt;OPTIONS&amp;gt; is a comma-separated list of option names. The&lt;br /&gt;
                mask value for the options set will be put into result &amp;lt;RESULT&amp;gt;&lt;br /&gt;
                (e.g. &amp;quot;|A|B|C|&amp;quot;). The &amp;lt;DEFAULTS&amp;gt; can be used to set the default&lt;br /&gt;
                mask value (e.g. &amp;quot;|A|B|&amp;quot;). (MASK/S was added in NeXtMidas 2.5.0)&lt;br /&gt;
&lt;br /&gt;
  MASK        - Similar to MASK/S except that it is limited to 32 input options.&lt;br /&gt;
                This limitation is due to the INFO= field for the message being&lt;br /&gt;
                set to the 32-bit integer mask value matching the selected&lt;br /&gt;
                options.&lt;br /&gt;
&lt;br /&gt;
                *** Always use MASK/S unless you need the integer mask. ***&lt;br /&gt;
&lt;br /&gt;
  PASSWORD    - Creates a password text-entry pop-up window. This is identical&lt;br /&gt;
                to TEXT, except that when the user types the password it will&lt;br /&gt;
                show up as stars (&amp;quot;***&amp;quot;). Use the LOGIN function to prompt for&lt;br /&gt;
                both user name and password.&lt;br /&gt;
&lt;br /&gt;
  OK          - Presents the message with only an &amp;quot;Ok&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
  OKCANCEL    - Same as to FUNC=&amp;quot;Ok&amp;quot; but with an added &amp;quot;Cancel&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
  TEXT        - Creates a text-entry pop-up window. The user's entry will be put&lt;br /&gt;
                into result &amp;lt;RESULT&amp;gt;. &amp;lt;DEFAULTS&amp;gt; can be used to provide an&lt;br /&gt;
                initial value for the input.&lt;br /&gt;
&lt;br /&gt;
  YESNO       - Creates a popup with the message &amp;lt;MESSAGE&amp;gt; and the buttons &amp;quot;Yes&amp;quot;&lt;br /&gt;
                and &amp;quot;No&amp;quot;. The name of the button pressed will be put into result&lt;br /&gt;
                &amp;lt;RESULT&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  YESNOCANCEL - Same as to FUNC=&amp;quot;YesNo&amp;quot; but with an added &amp;quot;Cancel&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTES:&lt;br /&gt;
  * If the input is canceled the value will be set to &amp;quot;CANCEL&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
  * If the user closes the window by clicking on the 'X' in the upper corner of&lt;br /&gt;
    the window it will be treated as a cancel even if no cancel button is shown.&lt;br /&gt;
    (This even applies to &amp;lt;FUNC&amp;gt;=Alert which has no buttons!)&lt;br /&gt;
&lt;br /&gt;
  * If the user closes the window by clicking the right mouse button (RMB) on&lt;br /&gt;
    the dialog box (when /OPTIONS=RmbOk) it will be treated as an &amp;quot;Ok&amp;quot; even if&lt;br /&gt;
    no &amp;quot;Ok&amp;quot; button is shown.&lt;br /&gt;
&lt;br /&gt;
MESSAGES:&lt;br /&gt;
  Messages Sent&lt;br /&gt;
    &amp;lt;MsgName&amp;gt;    - Message sent when popup is closed (sent only if /MSGID= is&lt;br /&gt;
                   set). The /MSGNAME= switch sets the name of the message.&lt;br /&gt;
                   The message's DATA field will be set to the value of the&lt;br /&gt;
                   user input or &amp;quot;CANCEL&amp;quot; if input was canceled. The INFO field&lt;br /&gt;
                   will be set to:&lt;br /&gt;
                     INFO=-2     - Input canceled by message.&lt;br /&gt;
                     INFO=-1     - Input canceled by user.&lt;br /&gt;
                     INFO=0      - Normal input from user.&lt;br /&gt;
                     INFO=&amp;lt;mask&amp;gt; - Mask value as integer for &amp;lt;FUNC&amp;gt;=MASK (but&lt;br /&gt;
                                   not MASK/S)&lt;br /&gt;
                     INFO=&amp;lt;num&amp;gt;  - Choice index (1..N) for &amp;lt;FUNC&amp;gt;=Choice/Buttons&lt;br /&gt;
                     INFO=&amp;lt;clr&amp;gt;  - RGB value of color for &amp;lt;FUNC&amp;gt;=Color&lt;br /&gt;
                  (Note that in the case of &amp;lt;FUNC&amp;gt;=Mask and &amp;lt;FUNC&amp;gt;=Color INFO&lt;br /&gt;
                  could be set to a negative value even if the input was not&lt;br /&gt;
                  canceled. For these check to see if DATA is set to &amp;quot;CANCEL&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
  Messages Received&lt;br /&gt;
    CANCEL     - Cancels input from the dialog box. (The INFO and DATA fields&lt;br /&gt;
                 are ignored.)&lt;br /&gt;
          &lt;br /&gt;
EXAMPLES:&lt;br /&gt;
  1. Running from the command line.&lt;br /&gt;
       popup name  Text   &amp;quot;What is your name?&amp;quot;           Quest &amp;quot;^env.user&amp;quot;&lt;br /&gt;
       popup quest Text   &amp;quot;What is quest?&amp;quot;               Quest&lt;br /&gt;
       popup color Choice &amp;quot;What is your favorite color?&amp;quot; Quest &amp;quot;Red,Green,Blue&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  2. Running inside a processMessage, block both user interaction (Mouse) and&lt;br /&gt;
      the macro (Macro).&lt;br /&gt;
       popup/blocking=&amp;quot;Mouse|Macro&amp;quot; &amp;amp;&lt;br /&gt;
            SAVEFILE YesNo &amp;quot;Save file before exit?&amp;quot; &amp;quot;Question&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  3. Running inside a processMessage, block user interaction (Mouse) but not&lt;br /&gt;
     the rest of the macro (Macro).&lt;br /&gt;
        popup/blocking=Mouse/msgid=main/msgname=&amp;quot;CONNECT&amp;quot; ,, Login &amp;amp;&lt;br /&gt;
             &amp;quot;Enter user is and pass for database access.&amp;quot; ,, &amp;quot;^env.user&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  4. Show a popup with a default value. It should come up under the mouse.&lt;br /&gt;
        popup/wpos=&amp;quot;Mouse&amp;quot; fname Text &amp;quot;New file name&amp;quot; Quest &amp;quot;^defName&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  5. THIS WON'T WORK: Show a non-blocking macro and then use the result it set.&lt;br /&gt;
        popup/blocking=None myres YesNo &amp;quot;Are you sure?&amp;quot; &amp;quot;Question&amp;quot;&lt;br /&gt;
        if myres eqs yes then&lt;br /&gt;
          ...&lt;br /&gt;
        else&lt;br /&gt;
          ...&lt;br /&gt;
        endif&lt;br /&gt;
     This will not work because POPUP will return immediately if /BLOCKING=None&lt;br /&gt;
     and the value of myres will not be set until later. To make this example&lt;br /&gt;
     work, use /BLOCKING=&amp;quot;Macro&amp;quot; or /BLOCKING=&amp;quot;Macro|Mouse&amp;quot;.&lt;br /&gt;
  &lt;br /&gt;
  6. Create a popup message but limit the width of the text to 10 characters &lt;br /&gt;
     per line.&lt;br /&gt;
       popup/popwidth=10 mypopup yesnocancel &amp;quot;Do you believe in the magic of &amp;amp;&lt;br /&gt;
              a young girls heart?&amp;quot; question &amp;quot;&amp;quot; &amp;quot;&amp;quot;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
SWITCHES:&lt;br /&gt;
  /BG           - Run the primitive backgrounded (this overrides /BLOCKING and&lt;br /&gt;
                  runs the primitive without blocking the macro). [DEF=FALSE]&lt;br /&gt;
  /BLOCKING=    - Blocking options (NeXtMidas 2.2.0 functionality matches&lt;br /&gt;
                  /BLOCKING=Macro, use /BLOCKING=None for none or /BLOCKING=Def&lt;br /&gt;
                  for default):  [DEF=Mouse]&lt;br /&gt;
                    Macro - Block execution of the macro while waiting for&lt;br /&gt;
                            input (user clicks in the panel will be added to&lt;br /&gt;
                            the message queue for processing later).&lt;br /&gt;
                    Mouse - Block user interaction in the rest of the panel&lt;br /&gt;
                            while waiting for input (any user clicks in the&lt;br /&gt;
                            panel will be ignored).&lt;br /&gt;
  /CANCELMSG    - Send a message even when CANCEL button is chosen [DEF=FALSE]&lt;br /&gt;
  /MSGID=       - If set the popup will send a message to the named command with&lt;br /&gt;
                  the user input (usually /MSGID=MAIN). [DEF=&amp;lt;not_set&amp;gt;]&lt;br /&gt;
  /MSGNAME=     - The name for message (only with /MSGID switch). [Def=POPUP]&lt;br /&gt;
  /POPWIDTH=    - (2.7.3) Sets the max width (per line)of the text message in &lt;br /&gt;
                  the popup.&lt;br /&gt;
  /TITLE=       - Set the window title [DEF=NeXtMidas or the macro name]&lt;br /&gt;
  /WIN=         - Sets the parent window. [DEF=PANEL]&lt;br /&gt;
  /WPOS=        - Sets the position of the popup: [DEF=CENTER]&lt;br /&gt;
                    Center    - The popup is automatically sized and centered&lt;br /&gt;
                                over the panel.&lt;br /&gt;
                    Mouse     - The popup is automatically sized positioned&lt;br /&gt;
                                under the mouse.&lt;br /&gt;
                    (x,y)     - The popup is automatically sized positioned at&lt;br /&gt;
                                the given (x,y) coordinate (relative to panel).&lt;br /&gt;
                    (x,y,w,h) - The popup is manually sized and positioned with&lt;br /&gt;
                                the given coordinates (x,y) and size (w,h).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>