Generic interface to filesystems
Mike McDonald
mikemac@titian.engr.sgi.com
Mon, 05 May 1997 13:27:57 -0700
>Date: Sun, 4 May 1997 15:55:33 -0700
>From: Adam Alpern <alpern@ns2.brightware.com>
>To: cwg@deepeddy.com, lispos@math.gatech.edu
>Subject: Re: Generic interface to filesystems
>I wrote a large blackboard system development environment in Macintosh
>Common LISP. Every object that could be visually represented had a
>#'browse method, so the user can always look at any object, without
>needing to know anything about (insert massive plug for CLOS here).
>
>-Adam
CLIM handles and implements this type of thing. The function is
called PRESENT. (My copy of the CLI< spec is at home so I'm going to
make some mistakes here in the exact calling conventions. Sorry.) You
can present any lisp object to just about any output stream. The
stream will remember which output corresponds to which object. So, in
Chris's example:
(browse (read-object (parse-pathname "~cwg/Mail/Misc/lispOS")))
32 Fri <-Martin Cracauer Re: Running Unix programs under LispOS
36 Fri <-Fare Rideau UserLand & Kernel efforts: complementary, not op
37 Sat <-Mike McDonald Time to get busy!
44 Sat ->Mike McDonald Re: Time to get busy!
47 Sat <-Kelly Murray Re: Time to get busy!
48 7:29 <-Fare Rideau Oomph
49 16:39 ->Fare Rideau Re: Oomph
50 16:41 ->Kelly Murray Re: Time to get busy!
52 17:13 ->lispos@math.gat Generic interface to filesystems
54 17:55 ->Adam Alpern Re: Generic interface to filesystems
65+ 20:23 ->Luca Pisati Re: Generic interface to filesystems
66 21:08 ->Luca Pisati RE: pathnames
would become
(present (read-object (parse-pathname "~cwg/Mail/Misc/lispOS"))).
If the mail-sequence object wrote a presentation method that called
present on each of the message objects (making a recursive present!),
then each message would be mouse sensitive with default mouse
handlers, like view-message. The whole mail-sequence would also be
mouse sensitive, maybe incorporating new mail when you click on it.
Using CLIM, you can also associate graphics with objects. There's a
macro called with-graphics-as-presentation that captures all graphics
output with in its body, and associates the object with that graphics.
Then the graphics is mouse sensitive just like the text listing above.
I'd suggest people interested in GUIs and user apps get a copy of
CLINC (it's an implementation of Dynamic Windows, the predecessor to
CLIM) and start playing with it to get an idea of what CLIM is all
about.
Mike McDonald
mikemac@engr.sgi.com
http://www.cons.org/free-clim/ for CLINC
ftp.digitool.com:/pub/mcl/contrib/clim/papers/ for the CLIM spec