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






TTInteractorProtocol




Adopted By: TTInteractor
Declared In: <ObjCore/TTInteractorProtocol.h>




Protocol Description

This protocol encapsulates the concept of interactors.  An interactor is an object which ``asks'' a language interpreter to evaluate some expression.  I.e., interactors interact with interpreters.  On the other side, interactors typically take user keystrokes, pack keystrokes into text strings to be evaluated, and present results of the evaluation back to the user.




Method Types

interp
isInteractive
printValue:
runModal:
setInterp:
stopRunningWithCode:




Instance Methods

interp
  (id)interp

Returns the interpreter that the interactor is interacting with.

See also:  -setInterp:




isInteractive
  (BOOL)isInteractive

Returns whether the interacor is interactive: interactor is interactive if it can take input from the user.




printValue:
  (void)printValue:(id <TTInterpValue>)v

Presents value v back to the user.




runModal:
  (int)runModal:(BOOL)f

Runs (activates) the interactor so that it starts sending evaluation requsts to the interpreter.  For example, the TTY interactor (TTInteractor) takes user keystrokes, packs keystrokes into text strings to be evaluated, sends evaluate: messages to the the interpreter, and presents the results back to the user.

If f is YES, the interactor is run modally: this method won't return until the interactor receivies -stopRunningWithCode:.  If f is NO, this method returns immediately with code 0, and continues to send evaluation requests to the interpreter until -stopRunningWithCode: is received.

See also:  -stopRunningWithCode:




setInterp:
  (void)setInterp:(id)i

Specifies interpreter for the interactor.

See also:  -interp




stopRunningWithCode:
  (void)stopRunningWithCode:(int)code

Stops the interactor.

See also:  -runModal:




###