Previous Next        Current Page: NeXtMidas Training / Getting Started - Part 2 / Threads in NeXtMidas / Registry
back
Start Here   
Background   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
   + Advanced Results Parameters   
   + Lab 3   
   - Threads in NeXtMidas   
      - Threads vs Processes   
      - Running in the Background   
      - Registry   
   + Lab 4   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Registry (the REGISTRY command)
    • The registry is a table of named references to all running commands.
    • It allows commands to communicate with other commands by name.
    • When a command is run in the background (or run in a pipe) an entry for it is added to the registry.
    • The registry can be accessed via a table (REG) or the REGISTRY command (usually shortened to REG).
      nM> plot/bg world.prm
      nM> reg
        T: REG             = Table of 3 entries
        O:  PLOT           = P: PLOT,FILE=world.prm,/BG=
        O:  SHELL          = nxm.sys.lib.Shell@c1cd1f
        T:  HANDLERS       = Table of 3 entries
    • The registry table has three special entries:
      SHELL Entry for the NeXtMidas shell.
      HANDLERS Table of handlers (file, packet, resource, etc.)
      MAIN When running inside a macro only, an entry for the current macro.
    • The registry table has entries for the currently running commands.
      • By default each entry has the same name as the command being run.
      • If multiple commands with the same name are run, a number is added after the name.
      • If the /ID=<name> switch is used, the <name> is used. (This is extremely common inside a macro.)
        nM> plot/bg/id=myplot world.prm
        nM> reg
          T: REG             = Table of 3 entries
          O:  SHELL          = nxm.sys.lib.Shell@c1cd1f
          T:  HANDLERS       = Table of 3 entries
          O:  MYPLOT         = P: PLOT,FILE=world.prm,/BG=,/ID=myplot

back