🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #16442

Re: Filtering

#16442
From: lsr
Date: Fri, 29 May 1987 21:38
37 lines
2102 bytes
In article <18940@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes:
>
>  a.)suppose we are looking at a pascal program. 
>  b.)Now, in our example, we create a "egrep" filter and place it
>  on top of the windowCat window. We tell the egrep filter
>"procedure|function" in its "command line" - a pane of the filter we
>use for giving the filter parameters. 
>The combined pair present us with a new virtual document, or view,
>that contains only the lines with either "procedure" or "function" on
>them. our window looks like:

The same idea is useful in implementing Undo.  

For example, consider selecting all the shapes in a MacDraw document and
changing their shades to white.  To save the old state of the document would
require storage proportional to the size of the document, which would be
unacceptable.  

The solution is to implement the 'change shade to white' command as a filter
on top of the document.  The filter simply displays every shape with a white
fill pattern, rather than the pattern stored in the document.

To undo the command, you simply remove the filter and redisplay the shapes.

At some point you DO have to change the internal data structures, assuming
that the command hasn't been undone..  This happens when the command can no
longer be undone (generally just before the next command is executed).

-- 
Larry Rosenstein

Object Specialist
Apple Computer

AppleLink: Rosenstein1
UUCP:  {sun, voder, nsc, mtxinu, dual}!apple!lsr
CSNET: lsr@Apple.com
Technical Details
Message-ID: <863@apple.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!pyramid!voder!apple!lsr
References: <8705130929.AA17766@cogsci.berkeley.edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!pyramid!voder!apple!lsr
From: lsr@apple.UUCP
Newsgroups: comp.sys.mac
Subject: Re: Filtering
Message-ID: <863@apple.UUCP>
Date: Fri, 29-May-87 17:38:45 EDT
Article-I.D.: apple.863
Posted: Fri May 29 17:38:45 1987
Date-Received: Sat, 30-May-87 12:07:53 EDT
References: <8705130929.AA17766@cogsci.berkeley.edu>
Reply-To: lsr@apple.UUCP (Larry Rosenstein)
Organization: Advanced Technology Group, Apple Computer
Lines: 37