Number: 792

Date: 23-Apr-84 14':22':49

Submitter: Sannella.PA

Source: vanMelle.pa

Subject: Want fns to go between textstream, textstream with readonly window, full tedit

Lisp Version: 

Description: '
Date': 19 Apr 84 19':32 PST'
From': vanMelle.pa'
Subject': TEdit': Want smooth transition among all Tedit states'
To': TEditSupport.pa'
cc': vanMelle.pa'
'
TEdit System Date': 13-Apr-84 11':44':53'
Lisp System Date': 16-Apr-84 11':25':02'
Impact': Moderate'
'
I''ve spoken with Greg about this at length, and he sent a brief note yesterday, but I want to make sure this gets into the database and stated precisely.  I need this in order to make Lafite''s message sender better behaved.  Besides, it would be nice to make this all cleaner.'
'
From the programmer''s point of view, there are three states a Text Stream can be in':'
'
(1) stream only, no window.'
(2) stream has a window viewing it.  Changes to the stream are reflected in the window (if it is a change to the visible part).  User can copy-select text out of window, but cannot change the stream.'
(3) stream is being edited.  User has full capability to change contents.'
'
I would like to be able to switch among these states with little or no hiccup.'
'
The current state of affairs':'
'
OPENTEXTSTREAM creates or puts a stream into state (1) or (2), depending on whether there is a window arg.'
'
TEDIT puts a stream into state (3), except that if it was in state (2), it needlessly redisplays the text, even if the window is the same.'
'
TEDIT.QUIT gets a stream out of state (3) and apparently into state (1), except that it leaves some crap on the window properties after closing the window.'
'
'
Thus, here is what I would like changed, roughly in order of importance':'
'
*** TEDIT.QUIT should NOT close the window (this is already AR 656), but should merely shift the state of the stream from (3) to (2).'
'
** There should be a new function (or new functionality for old function) that takes a stream from (2) to (1).  One possibility is for TEDIT.QUIT to have an extra argument "divorceFromWindow" whose meaning is to put stream into state (1) from whatever state it was in, and remove all tedit-related window properties.  If called when in state (2), the VALUE argument would be meaningless.'
'
* TEDIT called on a textstream that has a window already should merely change from state (2) to (3) without any messy redisplay.'
'
It would be okay with me if you unified it all into two functions, OPENTEXTSTREAM and CHANGETEXTSTREAM (for TEDIT.QUIT ?), and reserved the entry TEDIT for user-callable thing that edits files.'
'
By the way, although it is not addressed above, I think it makes sense for CLOSEF of a text stream to be a noop.  It should suffice to dissociate the window and drop the stream.  Thus, I did not list a state (0) Closed.'
'
Open question': is there a need for the READONLY prop?  The practical effect of READONLY seems to be that no caret is displayed.  However, to my thinking, a stream in state (2) should never have a caret displayed (it would imply a position for typein), and a stream in state (3) can''t reasonably be readonly.'
'
	Bill'


Workaround: 

Test Case: 

Edit-By: 

Edit-Date: 

Attn: sybalsky, nuyens

Assigned To: 

In/By: 

Disposition: 

System: Text

Subsystem: TEdit

Machine: 

Disk: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Difficulty: Moderate

Frequency: Everytime

Impact: Moderate

Priority: Hopefully

Status: Open

Problem Type: Design - Impl

Source Files: