>  Docs Center  >  Libraries  >  Buie  >  QINPUT
Libraries

QINPUT

QINPUT

Name


    qinput

Purpose (one Line)


    Prompt user for input using a popup widget.

Description


    This popup widget is meant to be used anywhere you might need input
      from a user. Functionally, it replaces "read,prompt='Input:',ans"
      that would be used in a older style input methodology. It can
      be used in widget and non-widget programs alike but is probably
      better used within widget programs.

Category


    Widgets

Calling Sequence


    result = qinput( [keywords] )

Inputs


Optional Input Parameters


Keyword Input Parameters


    DEFAULT = Default value for input. If not supplied the default has no
                  value which is interpreted differently for each input type.
    GROUP_LEADER = Group leader id. If present, qinput runs as a modal
                  application. Otherwise, it runs as a non-modal application.
    PROMPT = Character string to be displayed as a prompt.
    TITLE = Title for the widget.
    FLOATING = Set this keyword to accept a floating-point value.
    INTEGER = Set this keyword to accept an integer value.
    LONG = Set this keyword to accept a longword integer value.
    STRING = Set this keyword to accept a string value.

Outputs


    result = the returned value.

Keyword Output Parameters


    CANCELLED - Flag, if set means the input from user was cancelled and
                  you should not process the returned value.

Common Blocks


Side Effects


    Suspends other widget event generation. A user response is required.

Restrictions


  Note: the default value you supply needs to be consistent with the
    variable type you select if you want defaulting to work properly.
    For example, don't give it a string if you want float values or you
    may not get back what you intend.
  Funny behavior with IDL 8.1: this tool does not appear to work right
    if you do not supply the group_leader keyword information.

Procedure


Modification History


    Written by Doug Loucks, Lowell Observatory, July 27, 1994.
    2002/03/06, Marc W. Buie, fixed bug in handling keyword type switches,
                  added DEFAULT keyword.
    2004/04/12, Doug Loucks, Cleaned up event handling. Added code that uses
                  pointer variables. Added a 'Cancel' button.
    2006/11/25, Nathaniel J. Cunningham, added CANCELLED keyword so that
                  cancelling can be differentiated from null string.
    2008/10/30, MWB, slight rewrite of internals for robust state structure.
                  Also, now exclusively returns a scalar regardless of type.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us