LIST2

From ICE Enterprises
Revision as of 18:04, 27 April 2020 by ConvertBot (talk | contribs) (Displays the contents of a file or NeXtMidas TABLE in a table.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Displays the contents of a file or NeXtMidas TABLE in a table.

<FILE>     Name of input file or TABLE. (OPTIONAL)
<TEMPLATE> Name of template file OR a table containing the template. (OPTIONAL)

Keyword Only Parameters:
[AUTOSELECT]   - Automatically highlight selection [DEF=TRUE]
[CNT]          - Control when messages are sent: CLICK,MOTION,DRAG [DEF=CLICK]
[CLICKACTION]  - Table to control what happens when a LMB is pressed and the
                 content of the corresponding SELECT message.
                 [DEF={CELL=SELECT,ROW=SELECT,COL=SORT}]
                 OPTIONS:
                    CELL - SELECT,ROW,COL,NONE
                    ROW  - SELECT,NONE
                    COL  - SELECT,SORT,NONE
                 This does NOT alter column sorting, the global template entry
                 SORTENABLED= handles sorting.
[BUTTONACTION] - Table to control what happens when a mouse button is pressed
                 other than LMB which is context-sensitive (controlled by
                 CLICKACTION=). The table should be in the form:
                    {MMB=<act>,RMB=<act>}
                 Where <act> is one of the following:
                    None           - Do nothing
                    Menu           - Toggle the graphical menu (default for MMB)
                    Message        - Send a message to the macro
                    ClearSelection - Clear current selection (default for RMB)

LIST2 is a NeXtMidas file viewer primitive.

 ******************************************************************************
 **                         -- IMPORTANT NOTES --                            **
 ** As of release 2.2.0:                                                     **
 **    LIST is is scheduled for replacement by LIST2 in future releases.     **
 **    Please see nxm/sys/docs/list2migration.txt for details.               **
 **                                                                          **
 ** As of release 2.5.0:                                                     **
 **    Access to unsafe methods in MJList has been disabled by default. Only **
 **    those methods included as part of the "Public API" for MJList can be  **
 **    accessed. The /UNSAFE switch allows access to unsafe methods for      **
 **    backwards compatibility.                                              **
 ******************************************************************************

FILES:
  The following file types are supported:
      Blue - All standard Blue files supported by NeXtMidas
      Data - Any NeXtMidas pipes (read only)
      Text - Text files (read only)
      Dbf  - DBF database files (read only)
      CSV  - Comma-separated files

   Since 3.1.0, LIST2 can also display NeXtMidas Tables (see example).

FILE SIZES:
   The default mode of operations is for LIST2 to copy a file into RAM and then
   list the RAM. This allows for faster access to the file data. Since 3.1.2,
   LIST2 will only copy the file into RAM if the file is smaller than the size
   defined using the switch /UseRamFileMaxSize, which has a default of 16 MiB
   and a max of 2 GiB. Setting /UseRamFileMaxSize=0 or /UseRamFile=false
   will disable the creation of these RAM files.

SORTING:
  LIST2 provides the ability to do "one-click-sorting" of the table simply by
  clicking on the title of the column to sort by. Clicking on the title of the
  column once will sort the column in ASCENDING order (note the arrow next to
  the title points UP to indicate the sorting state), clicking a second time
  will sort the column in DESCENDING order (note the DOWN arrow now present),
  a third click will return the column to NOT_SORTED. LIST2 only supports
  sorting by a single column at a time.

  The "one-click-sorting" is an in-memory sort that affects how the data is
  displayed but does not alter the data in the file. Since the sort is done
  in memory it is not possible to sort large files, nor is it advisable to
  sort moderately-sized files since the sort may take away memory and CPU
  resources that would otherwise be available to data-processing primitives.
  The /SORTLIMIT switch can be used to set the maximum sort size or can be
  used to disable sorting entirely (with /SORTLIMIT=-1).

MOUSE:
  The CTRL key may be used to perform non-contiguous multiple selection and
  of the SHIFT key to select a range.


TEMPLATES:
  LIST2 uses an "Enhanced Midas Template" for setting the display properties of
  the table. This template format is a plain-text table and is often defined in
  a plain-text table file (e.g. "mytemplate.tbl"). The following is an example
  of a simple template that can be used with the ellipseflags5000.prm file:

         _GLOBAL_={TYPE="LIST2",LABELS="ROW",GRID="ON",BGCOLOR="GRAY"}
         POS={LABEL="Position (m)",FGCOLOR="RED"}
         ELPS={LABEL="Ellipse Parameters",FGCOLOR="BLUE"}
         NAME={LABEL="Name",FGCOLOR="RED",WIDTH=10}
         _3_={LABEL="Display Flags",FGCOLOR="BLUE"}

  The first entry in the table is named "_GLOBAL_" and sets the global settings
  for the table. Each subsequent entry sets the properties of an individual
  column. The column entries are named based on the name IN THE FILE (for the
  above example this means "POS" and not "Position (m)") or the ZERO-BASED
  column index (e.g. "_3_" -- note that the underscores before and after the
  column number are required).

    Special Note for Midas Type 1000/2000 Files:
      The columns in Type 1000/2000 files have the names F1, F2, F3, etc. This
      is for compatibility with the XDATALIST primitive in X-Midas which uses
      this naming convention for Type 1000/2000 files.

  No columns should be defined more than once in the table, EXCEPT that a named
  entry and a numbered entry may specify the same column (this allows a general
  numbered entry and a specific named entry to be in a template that is used for
  various file types), in this case the named version will be processed and the
  numbered entry will be ignored.

  The column entries in the template will only be applied to those columns that
  are in the table at the time when the template is applied.


  GLOBAL PROPERTIES:
    TYPE=[LIST2|XDATALIST]                  (Default is LIST2)
      Indicates the type of template. The XDATALIST type is used only for those
      tables converted from an X-Midas template file (see CONVERT, LIST) that
      follow the structure used by XDATALIST. Note that an XDATALIST template
      will not follow any of the normal LIST2 template properties, other than
      having the global TYPE=XDATALIST set.

    LABELS=[ROW|COL|BOTH|NONE]              (Default is BOTH)
      Indicates if row/column labels should be shown.

    GRID=[ON|OFF]                           (Default is ON)
      Indicates if the grid should be shown.

    ROWHEIGHT=<int>                         (Default is -1)
      (Since 2.5.0) Sets the height of the rows in the table in pixels (set
      this to -1 to have the height computed to match the font used). Great
      care should be taken in setting this since a height that looks good
      on one system may look bad on another system.

    FONTSIZE=<float>                        (Default is based on Look & Feel)
      (Since 2.5.0) Sets the font size for all of the cells. Note that the
      font size is in "points" and not pixels. (Note: Some of the column
      renderer may ignore this setting.)

    FONTSTYLE=<mask>                        (Default is based on Look & Feel)
      (Since 2.5.0) Sets the font style for all of the cells. This is a mask
      value with options for "ITALIC" and "BOLD". This matches the behavior
      of nxm.sys.line.setFontStyle(..). (Note: Some of the column renderers
      may ignore this setting.)

    FGCOLOR=<color>                         (Default is based on Look & Feel)
    BGCOLOR=<color>                         (Default is based on Look & Feel)
      Sets the default cell foreground (text) and background colors. <color>
      may be either a named color (e.g. "red") or the RGB value of the color
      (e.g. 0xFF00FF). Alternatively it may be set to the text "FIELDN" where
      N is the column number (1..n) where the color is stored. The "FIELDN"
      syntax is usually used in conjunction with a hidden COLR column that
      has a specific color defined for each row. (Prior to NeXtMidas 2.3.0
      the FIELDN syntax only worked with FGCOLOR, since NeXtMidas 2.3.0 it
      works with both FGCOLOR and BGCOLOR.)

      As of NeXtMidas 2.3.0 it is also possible to use "FIELD_<name>" where
      <name> is the name of one of the columns. This less confusing than
      the FIELDN syntax and allows templates to be independent of the order
      of the columns in a file.

    COLORMAP=<cmap>                         (Default is DEFAULT)
      Sets the color map used for indexed colors (usually combined with
      FGCOLOR=FIELDn). The <cmap> variable can be the name of any predefined
      colormap (GrayScale,Ramp,XRamp,Wheel,Terrain,Multi,T5Layer,MapLine,Grid,
      Spectrum,XDatalist), or a list of colors (e.g. COLORMAP="BLACK,RED,YELLOW,
      GREEN,BLUE"). Note that if giving a list of colors the initial color
      listed is not used (this matches the behavior in PLOT where the initial
      color has special meaning). The most common color map is "XDATALIST"
      which sets the colors similar to those used by XDATALIST in X-Midas. If
      <cmap> is set to DEFAULT then the default color map settings (which match
      LIST) are restored.

    SHADECOLOR=<color>                      (Default is based on BGCOLOR)
    SHADEINT=<int>                          (Default is 0)
      This applies shading to alternate rows to aid in reading across large
      tables. To apply a gray shading color to every third row (this gives
      a view common to many accounting forms) set SHADECOLOR=gray,SHADEINT=3.
      SHADECOLOR sets the color to use for shading and SHADEINT sets the
      interval between shaded rows. Setting SHADEINT=0 will disable shading,
      setting SHADEINT to a value GREATER THAN one will enable shading (it is
      an error to set SHADEINT=1 since that would attempt to shade all rows).

    SORTENABLED=[ON|OFF]                    (Default is ON)
    SORT=<sort>                             (Default is "")
      SORTENABLED enables/disables the sorting of rows based on a given column
      value. If sorting is enabled, SORT sets the column to sort by (e.g. "+FOO"
      to sort FOO in ascending order or "-FOO" to sort descending), set this to
      "" to set the table to unsorted. Use {SORTENABLED="ON",SORT=""} to enable
      sorting (if the user chooses to use it) but with no initial sorting.

    COLDRAG=[ON|OFF]                        (Default is ON)
      This enables/disables the re-arranging of the column display by the user.
      When this is turned on the user may elect to re-order the display of the
      various columns to an ordering that they find easiest to use. Turning this
      off will guarantee that columns are always ordered as specified in the
      file.

    AUTOHIDE=[ON|OFF]                       (Default is ON)
      If this is ON any columns not specified in the template will be hidden,
      If this is OFF all file columns will be shown, whether in the template
        or not, unless the template defines the column as HIDE=TRUE.

    AUTOORDER=[ON|OFF]                      (Default is ON)
      If this is ON any columns will be initially ordered (left-to-right) in
      the order they appear in the template. When this is OFF they will be
      initially ordered in the order specified in the file.

    ADJSELCELLS=[ON|OFF]                (Default is FALSE)
      If this is ON any selected cell will be adjusted to remain selected when
      a row is added or removed in a location that re-indexes the selected cell.
      For example, if Row 4 is selected and a new Row 1 is added, Row 4, (which
      was formerly Row 3 before the addition of the new row) will 'lose'
      selection and Row 5 (the former Row 4) will be selected. By default,
      selections are maintained by row index.

  COLUMN PROPERTIES:
    RENDERER=<string>                       (Default is null)
    RENDEROPTS=<table>                      (Default is null)
      Override the default renderer used for the cells in the given column.
      When this is used most of the options below are simply ignored, it is
      expected that the custom cell renderer will do all of the work. See
      "RENDERER" below for details and examples.

    LABEL=<string>                          (Default is to use the column name)
      Sets the column label to be shown at the top of the table (when column
      labels are displayed).

      (Use of this feature will not alter the actual name of the column, only
      the title displayed on the row header.)

    WIDTH=<int>                             (Default is automatically set)
      Sets the width of a column (in number of characters).

    ALIGN=[LEFT|RIGHT|CENTER]               (Default is automatically set)
      Sets the horizontal text alignment of a column.


    FGCOLOR=<color>                         (Default uses global setting)
    BGCOLOR=<color>                         (Default uses global setting)
      Overrides the global FGCOLOR/BGCOLOR settings to set the foreground and
      background colors for cells in the column.

    COLORMAP=<cmap>                         (Default is DEFAULT)
      As of NeXtMidas 2.3.0 is also possible to use a column-specific COLORMAP
      that is a table. In this case the table is in {<val>=<color>,...} form
      that maps possible column values to their assigned color. The value of
      "_DEFAULT_" can be provided as a default for any that don't otherwise
      match in the COLORMAP. It is also possible to provide colors that link
      to other fields (e.g. "FIELD_<name>"). This allows a template to link
      various attributes in the coloring. For example:

        {_GLOBAL_={FGCOLOR="FIELD_STATUS"},&
         MODULATOR={},&
         STATUS={COLORMAP={OFF="GRAY",_DEFAULT_="FIELD_TYPE"}},&
         TYPE={COLORMAP={AM="BLUE",FM="GREEN",CM="YELLOW",_DEFAULT_="RED"}}}

      In the above example all rows will be colored blue if TYPE=AM, green if
      TYPE=FM, yellow if TYPE=CM, and red if unknown; EXCEPT if it is turned
      off in which case it will be colored gray. There is another example of
      this in the test macro %test_list2_templates_colors.

      Since NeXtMidas 2.5.0 it is possible to color based on a range of values.
      To do this the table key is an in-line test (i.e. "TEST(...)") that tests
      the current cell value ("X") against a range of values. For example:

        nM> list2 testxy3000.prm &
              {_GLOBAL_={AUTOHIDE=NO,FGCOLOR=FIELD_ABSC},&
               ABSC={COLORMAP={_DEFAULT_=red,TEST(X,LT,3)=yellow}}}

      Important notes about using "TEST(...)":
        (1) The order in which the tests are evaluated is arbitrary and may
            change without notice, all tests should be mutually exclusive.
        (2) The only result/variable available is "X" which is set to the
            value of the cell.
        (3) Any of the standard tests (see EXPLAIN IF) can be used.

      The COLORMAP is evaluated in the following order:
        (1) Any test cases.
        (2) Any exact-match values.
        (3) Use _DEFAULT_ value.

      Acceptable color values:
        (1) The name of a color (e.g. "red")
        (2) The hex value of a color (e.g. "#FF0000")
        (3) The index of another column to get the color from (e.g.
            "FIELD1" for column 1), this is similar to XDATALIST
        (4) The name of another column to get the color from (e.g.
            "FIELD_ABSC" for the column named "ABSC")

    MCOLORS=<colors>                        (Default is DEFAULT)
      TBD

    TYPE=[ANGLE|DATE|ENUM|NUMBER|           (Default is automatically set)
          STRING|TOGGLE]
    FORMAT=<string>                         (Default is automatically set)
    TIMEZONE=<string>                       (Default is "UTC")
    ENUM=<table>                            (Default is null)
      TYPE sets the type of type of data to be displayed:
        - ANGLE:  (Since 2.5.0) An angle format is applied to an angle in
                  decimal degrees. See nxm.sys.lib.MFormat for details on the
                  syntax for allowable FORMAT= values.
        - DATE:   (Since 2.5.0) A date format that is applied to a Midas time
                  (seconds since 1950). The FORMAT= used with TYPE=DATE matches
                  the java.text.SimpleDateFormat class. The TIMEZONE= entry can
                  be used to override the time zone being used, the allowable
                  time zone values must match those given by java.util.TimeZone.
        - ENUM:   An enumerated set of choices. When this is set the ENUM table
                  must be given listing the properties for each option:
                    LABEL - The value as displayed graphically. (Required)
                    VALUE - The value as it exists in the file. (Required)
                    COLOR - The color for the value.            (Optional)
        - NUMBER: A numerical value (double, float, long, int, ...). The format
                  for the numerical value is set by FORMAT.
        - STRING: Any Java String or ASCII String to be displayed, or any Java
                  Object for which the display value can be obtained via the
                  Object's toString() method.
        - TOGGLE: A true/false option that will display as a checkbox but will
                  represent a true (checked) or false (unchecked) value. If
                  the corresponding value in the file is numeric then zero
                  is false and all others are also true. If the corresponding
                  value in the file is a string then any value that evaluates
                  to true using StringUtil.isTrue(..) is true and all others
                  are false.

      FORMAT sets the format for a number using a Java format string (see the
      documentation for java.text.DecimalFormat for details), or one of the
      following strings:
        GEN    - X-Midas GENeral format (no exponent if between 1E-3, 1E15).
        VIS    - X-Midas VISual  format (no exponent if between 1E-3, 1E7).
        SCI    - SCIentific notation.
        ENG    - ENGineering notation   (exponent is a multiple of 3).
        MAN    - MANtissa notation      (no exponents).
        DMS    - Deg-Min-Sec angular format.            ddd'mm'ss
        LAT    - Deg-Min-Sec format for latitude.       ddd'mm'ssN
        LON    - Deg-Min-Sec format for longitude.      ddd'mm'ssE
        STD    - STanDard time code format.             [yy]yy:mm:dd::hh:mm:ss
        ACQ    - ACQisition time code format.           [yy.ddd]:[hh:mm:ss]
        EPOCH  - EPOCH quadwords for time code.         [yy]yy:sec_in_year
        NORAD  - NORAD timecode format.                 yyddd.frac_of_day
        TCR    - TimeCode Reader format.                ddd:hh:mm:ss
        VAX    - VAX time format.                       dd-MMM-yy[yy]:hh:mm:ss
        HMS    - Hour-Min-Sec time format.              hh:mm:ss.ffff
        YMD    - Year-Month-Day format.                 yyyy:mm:dd
        NET    - 32-bit integer formatted as URL.       127.0.0.1

      If the data is an array type (e.g. CF, VD, 8B) all elements will use the
      same formatting and nothing special needs to be done.

      To create a format for a fixed array size of non-homogeneous values,
      specify the pattern to use for each element in the array separated by an
      ampersand ("&") character. For example:
        "DMS&DMS"       (Latitude + Longitude)
        "VIS&LAT&LON"   (Altitude + Latitude + Longitude)
        "###ft&DMS&DMS" (Altitude + Latitude + Longitude)
        "HMS&SCI"       (Time + Magnitude)
      Note that use of a fixed array size format mandates that the data in the
      table match in size and order.

    HIDE=[ON|OFF]                           (Default is OFF)
      Indicates if the column should be hidden from display.

RENDERER:
  The RENDERER= and RENDEROPTS= attributes in the template allow a custom cell
  renderer to be used for all of the cells in a given column. When this is used
  most of the standard template options are ignored, it is expected that the
  custom cell renderer will do all of the work.

  The RENDERER= option specifies the fully-qualified class name of the cell
  renderer to use. The class must implement javax.swing.table.TableCellRenderer
  and must have either a no-argument constructor or a constructor that takes in
  a nxm.sys.lib.Midas instance. Additional constructors will be ignored, if both
  a no-argument constructor and a constructor that takes in a Midas instance are
  provided, the one that takes in the Midas instance will be used.

      Example:
        {ABSC={RENDERER="nxm.myopt.libg.SpecialRenderer"}}

  The optional RENDEROPTS= entry in the template takes in a table of keys that
  should be set in the renderer's class. The should match the set methods in
  the constructor. This allows options a custom renderer to have its own "mini-
  template" for the column:

      Example:
        {ABSC={RENDERER="nxm.myopt.libg.SpecialRenderer",
               RENDEROPTS={MYSTR="HelloWorld"}}}

  A word of warning: It is very easy to create a custom renderer that has such
  bad performance that it causes all graphics (not just LIST2) to run slowly.
  In fact, numerous books and web sites provide tutorials on TableCellRenderer
  that are extremely slow. It is strongly suggested that users avoid writing
  a custom renderer without extensive Swing experience.

  ******************************************************************************
  * WARNING: Custom renderers are a "use at your own risk" feature. When using *
  *          a custom renderer you assume all responsibility for performance   *
  *          and functionality. The NeXtMidas team is unable assist users of   *
  *          custom renderers.                                                 *
  ******************************************************************************

DRAG AND DROP:
  Since NeXtMidas 3.3.0, LIST2 supports Drag and Drop as follows:

  Enabling or disabling Drag and Drop is done via the /DRAGDROP switch.

  When enabled, the DRAG object created by dragging from a LIST2 will be a
  Table (in String form) of the current selected rows from the LIST2.

  Since the actions to take for a DROP are application-dependent, an object
  DROP-ed into a LIST2 is sent to the message handler as the DATA portion of
  a Message.

  For example usage, see the macro nxm.sys.test.test_plot_drag_drop.mm.

OTHER:
  - Like other graphical primitives it is possible to Iconify/Deiconify a
    stand-alone LIST2. If LIST2 is in a PANEL, you need to do this on the PANEL.
    Here is an example of a stand-alone LIST2:
        nM> list2/bg testxy3000.prm
        nM> set reg.list2.mw.display icon
        nM> set reg.list2.mw.display front

  - Reducing "flicker" with Java Swing double buffering: Due to the nature of
    LIST2 only reading part of the file at a time (so it can read files greater
    than the RAM size), many users notice a flicker effect while scrolling.
    This can be alleviated through the use of Swing double buffering, which
    buffers the drawing in the background and then draws it all at once. To
    enable Swing double buffering in NeXtMidas, do the following:

      nM> env set graphics +swingdb

MESSAGES:
  Messaging support for List2 is limited. However, if the /LEGACY switch
  is used the messages used for LIST in NeXtMidas 2.1.0 will work (for details
  see EXPLAIN LIST).

  Message names followed by a star (*) are only supported when in /LEGACY mode,
  see the LIST explain file for more details.

  Processed:
    ADDCOLUMN *      - Adds a column.
    APPLYTEMPLATE *  - Applies a new template.
    CLOSEFILE *      - Closes the current file.
    CURSOR *         - Sets highlight color.
    EXIT             - Exits the LIST.
    GETROW *         - Gets a row from the list.
    GETROWVECTOR *   - Gets a row from the list as a vector.
    GETROWTABLE *    - Gets a row from the list as a table.
    GETCOL *         - Gets a col from the list.
    GETCOLUMNVECTOR *- Gets a col from the list as a vector.
    GETCOLUMNTABLE * - Gets a col from the list as a table.
    HIGHLIGHT *      - Message is ignored by LIST2.
    OPENFILE *       - Opens a new data file.
    OPENTEMPLATE *   - Opens a new template.
    OUTPUTTYPE *     - Sets the output type for legacy functions.
    PAN *            - Deprecated: Does nothing.
    POP              - Push or pop the window INFO field indicates action
                       (0=Push,1=Pop,-1=Toggle). (Warning: LIST did not check
                       the INFO field and always assumed INFO=-1; this was
                       inconsistent with other primitives such as PLOT.)
    REFRESH          - Refresh the list.
    SETROW *         - Sets a row in the list.
    THEME *          - Message is ignored by LIST2.


    BUTTON           - Internal Message: Mouse click.
    CONTROLS *       - Internal Message: Does nothing in LIST2.
    KEYPRESS         - Internal Message: Keyboard key press.
    MENU *           - Internal Message: Does nothing in LIST2.
    OTHER *          - Internal Message: Does nothing in LIST2.
    POINTER          - Internal Message: Mouse motion.
    RESIZE           - Internal Message: Window resized.
    SETTINGS *       - Internal Message: Does nothing in LIST2.
    WINDOW           - Internal Message: Window action.

  Sent:
    DESELECT *       - Deselect of selected rows (see SELECT message)
    DROPDATA         - User has executed a drag and drop on a LIST2
    SELECT *         - Selection information
                       Required Data Fields:
                         S:TYPE    - ROW, COLUMN or CELL
                         O:ROW     - Row number (1..n or -1 for COLUMN type)
                         O:COLUMN  - Col number (1..n or -1 for ROW type)
                         T:VALUE   - Table of data from last click
                         S:NAME    - TBD
                       Optional Data Fields:
                         T:CURRSEL - Table of CURRENT selected rows
                         T:PREVSEL - Table of PREVIOUS selected rows
    SELECTROW *      - Selection information for a row (see SELECT message)

EXAMPLES:
  1. List a file:
       nM> list2 fftdemo     ! Type 1000 file
       nM> list2 testxy3000  ! Type 3000 file
       nM> list2 cities.txt  ! Text file
       nM> list2 world.dbf   ! DBF file

  2. List a file with an X-Midas XDATALIST template:
       nM> list2/legacy myFile myTemplate

  3. List a file with a LIST2 table template:
       nM> list2 fftdemo {F1={TYPE="NUMBER",FORMAT="0.00"}}
       nM> list2 cities  {_GLOBAL_={SORTENABLED="ON",SORT="+NAME"},&
                          POS={FGCOLOR="BLUE",FORMAT="###m&LAT&LON"},&
                          NAME={FGCOLOR="RED"}}

  4. List a file where all changes go directly to disk (this is the default):
       nM> list2 myfile

  5. List a file where all exist only in ram (the file on disk is not modified):
       nM> list2/copy myfile

  6. List the file using 1-based or 0-based indexing:
       nM> list2/base=1 fftdemo
       nM> list2/base=0 fftdemo

  7. List a pipe:
       nM> list2 _mypipe

  8. List a file but poll it for changes every 5 seconds:
       nM> list2/polldata=5 myfile

  9. Automatically create a file in ram that matches a given template (note that
     this creates a Type 3000 file with each record of type "XA", template names
     must be valid Type 3000 record names):
       nM> list2 ,, {NAME={FGCOLOR="RED"},DATE={FGCOLOR="BLUE"}}

  10. List a file but do not allow the cells to be edited.
       nM> list2 cities /editable=false

  11. Refresh (repaint/redraw) a row in the List
       invoke reg.mylist.redraw(rownum)

  12. Refresh (repaint/redraw) the entire List
      message send id=mylist ,, "REFRESH"
           - or -
      invoke reg.mylist.refresh()

  13. List a TABLE
       nM> list2 {ROW1={A="hi",B="there"},ROW2={A="hello",B="world"}}

  14. List a file without copying the file into RAM
       nM> list2/useRamFileMaxSize=0/bg apenny
           - or -
       nM> list2/useRamFile=f/bg apenny

  15. List a file of size 64 MegaBytes and allow the file to be copied into RAM
      for faster paging:
       nM> list2/useRamFileMaxSize=65M/bg myFile


SWITCHES:
  /BASE=n            - Set this to 1 for 1-based indexing, 0 for 0-based
                       indexing.
  /COPY              - DEPRECATED: Use /MOD=F in place of this.
  /DRAGDROP          - Enable or disable Drag and Drop. (Since NeXtMidas 3.3.0)
  /EDITABLE          - Allow editing of cells in the table. This is different
                       from the /MOD switch in that this will select the cell
                       but not enter 'edit' mode. [DEF=TRUE]
                       (Since NeXtMidas 2.7.3)
  /EXIT=             - Mask value with flags RETURN, MENU, MESSAGE, WINDOW
                       or ALL [DEF=NONE in pipe mode, else ALL]
  /LEGACY            - DEPRECATED: Enables the legacy interface causing LIST2
                       to act more like LIST from NeXtMidas 2.0.0.
  /MOD               - Allow direct file modifications. [DEF=FALSE]
  /MSGID=            - The ID to process messages (usually /MSGID=MAIN to send
                       to the processMessage procedure of the current macro.)
  /POLLDATA=n        - Polls the current file for changes n seconds. Set this
                       to 0 to disable polling. If the input file is a pipe
                       this indicates the delay between pipe reads.
                       Do not use /MOD switch with this. [DEFAULT=0]
                       Changed from /POLL=n in 3.3.1.
  /PREVANDCURR       - DEPRECATED: Used with /LEGACY to indicate if previous and
                       current selections are included in selection message
                       (true) or not. Excluding them matches LIST in NeXtMidas
                       2.0.0, including them matches LIST in NeXtMidas 2.4.0.
                       [DEF=TRUE]
  /SORTLIMIT=n       - Sets the maximum number of records in a sortable file
                       (see SORTING above). [DEFAULT=8192]
  /UNSAFE            - DEPRECATED: Allow access to unsafe methods in MJList
                       (this was the default in NeXtMidas 2.2.0)
  /USERAMFILE        - Whether or not to copy the file being listed into RAM for
                       faster access. [DEF=TRUE], unless /MOD=TRUE.
                       (Since NeXtMidas 3.1.2)
  /USERAMFILEMAXSIZE - Used to set the maximum size allowable for the listed
                       file to be in order for it to be copied to RAM. Setting
                       this to <= 0 will prevent the creation of the RAM file.
                       [DEF=16 MiB] (Since NeXtMidas 3.1.2)

See Also: nxm.sys.inc.ListInterface, nxm.sys.inc.ListFile, nxm.sys.lib.MFormat,
See Also: LIST, nxm.sys.libg.MJList