At 01:45 PM 10/19/96 -0600, you wrote:
>Devin,
>
>Thank you so much for the reply. Yes, I have written ACL code in the
>Windows95 environment, using their Common Graphics package. I know the Common
>Lisp is wholy (holy?) transportable, but the window, dialog, and graphic
>routines are dissimilar. This is where I need some help. Karsten, the young
>lady who wrote the German MCL to ACL graphic code has responded, and I have
>asked for the English version of her code as a reference. Still, I need to go
>from ACL to MCL with my graphic code. The ACL code is a subset of CLIM. And
>I use very little of it. What I do have is an ACL dialog as my primary
>window, so I can have Dialog-Items, and a secondary bitmap window which I can
>copy BMP to then bitblt (redisplay) onto the dialog window for a background.
>Some of my BMP's are fairly complex, so I have them drawn in photoshop or
>similar package and saved to disk. The redisplay-window ( for the Mac)
>routine is the area which I am unfamiliar with.
That is exactly the major limitation to the MCL graphics package: THERE IS
NOTHING LIKE A BMP WINDOW, e.g. a window which "remembers" what you have
drawn to it and is able to refresh, redisplay, etc. The only way to
accomplish this is to actually record (in your own code) all actions taken
to the window, then erase it, then redraw everything. This is something
about MCL which is very primitive and very disturbing when trying to do a
port.
To discover this, try creating a window in MCL, and then use (draw-rectangle
to put a black rectangle in the corner. Then drag something over it, e.g.
another window, and it will literally erase the rectangle. There is no way
to make it reappear, except to modify the actual method for the window so
that a black box is drawn in the window whenever it is redisplayed. MCL
makes absolutely no 'note' of the fact that you have drawn something into
the window. In a sense, everything must be a piece of the window.
Fortunately, the Macintosh, not the MCL, will automaticall refresh the
window everytime it is screwed with, but only with what MCL thinks is
supposed to be in the window. The only way to do this is to keep your own
record of what is supposed to be in the window and make sure that the
resfresh-window method references this database/list/whatever each time it
tries to refresh.
My port faced a similar problem: I wrote a program to draw a map of
automated reasoner "live" as it reasoned from premise to conclusion to
conclusion, etc, with little colored circles representing various "nodes" in
the inferential chain. In ACL, this is easily accomplished with a BMP
window by simply drawing the circles. The window itself keeps track of
where they are, what color they are, etc etc. In MCL, this doesn't work.
Instead, you have to keep a list of all the circles in the window, each
color, and so forth, and tell the refresh method to check this list and
redraw the whole thing whenever needed.
I will try to dig up the comparitive code on this. Basically, it would be
really awesome if someone created a BMP class of window (view, I guess) in
MCL that "remembered" everything drawn to it. This would save the ACL-MCL
port tremendous time. This is a major shortcoming of MCL.
I will try to dig up the ACL and MCL code that I wrote for this graphics
package, so you can see how I kludged around this problem...but it isn't pretty.
DFH
_____________________________________________________________
Devin F. Hosea Equity Capital Group
203 357 6304 (office) GE Capital Corporation
520 400 0518 (cellular) 60 Long Ridge Road
888 614 3875 (universal #) Stamford, CT 06927
800 830 3736 (universal fax) personal web page:
<alumni.princeton.edu at dhosea> http://www.inch.com/~dhosea
_____________________________________________________________