From: Len Charest
Subject: Re: some LispView questions
Date: 
Message-ID: <1992Feb27.014639.11753@jpl-devvax.jpl.nasa.gov>
Mail to ·······@arc.ab.ca bounced, so I'm posting to the newsgroup.

In article <······················@arc.ab.ca>, you write:
|> I have run into a couple of problems using Lispview which I am sure
|> have simple solutions...could someone help!!!???

As long as you are aware that Sun has discontinued support for LispView.

|> 1.  How can I get graphics objects to persist upon a "refresh" event?
|> i.e.  I draw a rectangle on a base window; refreshing the screen
|> erases it!

When the screen is refreshed all LispView objects are sent a 'damage-event' (ie, a CLOS object of class damage-event). You may write methods on the generic function RECEIVE-EVENT that provide special handling for your windows (eg, draw a rectangle, or more generally handle all 'refresh' output). The arglist for receive-event is (canvas interest event), so you probably want to specialize on event. See the LispView Programming Manual, chapter 11, for more details. 

|> 2.  If I execute a disk-saved version of my application, I get an error
|> - something about a parent window not defined...i tried to make the
|> "display" explicit in the code, but the same problem appears.

My experience has shown that you cannot disk-save an image with even the LispView process (ie, the LispView event dispatchers) running and then expect the image to run when you load it later. My advice is to simply save an image that has all your windowing code loaded *but* has not yet called any code that would create a LispView DISPLAY object. Then it is the responsibility of your top-level function to create all the program's windows. Simply call this top-level function when you load the image.

|> 3.  How can I control the color for things like scroll-bars, menu
|> buttons etc..

The short answer is--I don't know how to do it programmatically. The color characteristics of these interface objects are determined by X resources that are best specified in your .Xdefaults file. 

The long answer is that there probably is a way to do this, but it means tweaking undocumented parts of LispView. If you inspect, say, a COMMAND-BUTTON object, you will not find any 'color' slots. But do inspect the object stored under the DISPLAY slot. It has some potentially helpful slots of its own; for example, ROOT-CANVAS, SUPPORTED-DEPTHS and COLOR-MAPS.

Good luck!
..................................................
                                  Len Charest, Jr.
                 JPL Artificial Intelligence Group
                          ·······@aig.jpl.nasa.gov