>  Docs Center  >  Libraries  >  Motley  >  MGH_EDIT






  The procedure opens a text editor to edit the specified file(s).

Calling Sequence

  MGH_EDIT [,Name]

Positional Parameters

  name (input, optional, string scalar or array)
    Normally this is an input argument specifying the file(s)
    to be edited; if it is not supplied then the editor is
    started with no file open. Several keywords (below) modify the
    behaviour of this argument.


  CLASS (input, switch)
    If set, take the name argument as a list of class names and
    search the IDL path for the corresponding <class>__define.pro
  COMMANDS (input, switch)
    Collect and edit a list of commands from the command history.
  EDITOR (input, scalar integer)
    Specify which of several different editor commands to use.
    If set, create the file if it does not already exist.
  PICK (input)
    If set, call DIALOG_PICKFILE to supply the file name and return
    the value selected by the user via the name argument.
  CLASS (input, switch)
    If set, take the name argument as a list of routine names and
    search the IDL path for the corresponding <routine>.pro
  VARIABLE (input)
      If set, take name as a variable--save it to a temporary
      file then open the file in the editor.

Side Effects

    A message is displayed. The editor is started & the specified
    files (if any) is opened.

Modification History

  Mark Hadfield, 1993-10:
    Created. Editor is launched using the WINSPAWN command (starts
    editor via a DDE link).
  Mark Hadfield, 1995-03:
    When directory is not specified, now opens a file in the current
  Mark Hadfield, 1995-12:
    Removed OS detection and changed WINSPAWN call to SPAWN.
  Mark Hadfield, 1996-09:
    Back to WINSPAWN, which is now an enhanced wrapper for SPAWN.
  Mark Hadfield, 2000-08:
    Updated for IDL 5.4: added NOSHELL keyword for SPAWN, PROC_NAME
    function replaced with FILE_WHICH.
  Mark Hadfield, 2002-01:
    Minor enhancements. Renamed MGH_EDIT.
  Mark Hadfield, 2002-07:
    Now calls Python (win32) script xmedit.pyw
  Mark Hadfield, 2003-09:
    Upgraded to Python 2.3. Note that Python executable name is
  Mark Hadfield, 2005-06:
    Added CMD_OPTION keyword. Default editor is now Textpad.
  Mark Hadfield, 2007-04:
    TextPad program file name updated for version 5.
  Mark Hadfield, 2009-10:
    Available editors are now defined via the !MGH_EDITOR system
    variable and selected with the EDITOR keyword. Moved into the
    Motley library.
  Mark Hadfield, 2011-09:
    The name argument now accepts vector values when CLASS or
    ROUTINE is set.
  Mark Hadfield, 2014-06:
    Updated formatting.

© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us