Release 5.  Copyright ©1994-1998 by TipTop Software, Inc.  All Rights Reserved.



TTInteractor




Inherits From: NSObject
Conforms To: TTInteractorProtocol
Declared In: <ObjCore/TTInteractor.h>





Class Description

This is the TTY interactor.  It reads the user keystrokes the from standard input.




Method Types

TTInteractorProtocol - setInterp:
- interp
- isInteractive
- printValue:
- runModal:
- stopRunningWithCode:
- ttyGetline:




Instance Methods

isInteractive
  (BOOL)isInteractive

Returns YES if the interactor is reading user keystrokes from the standard input.  Returns NO if the standard input is a file/pipe.




runModal:

  (int)runModal:(BOOL)f

The TTInteractor's implementation of this method currently ignores f and always runs modal.  I.e., this method won't return until -stopRunningWithCode: is received, or until EOF is encountered.

See also:  - runModal: (TTInteractProtocol)




ttyGetline:

  (const char *)ttyGetline:(const char *)pr

Reads a line of text from the standard input.  Prompt pr is printed if -isInteractive is YES.  By default, the getline library is used.  The getline library provides some Emacs-like line editing features.  To turn getline OFF do:

dwrite System UseGetline NO

If you want to use the GNU readline library for command input, override this method.




###