[cells-gtk-devel] Cells-gtk on Lispworks 5.0

Peter Denno peter.denno at nist.gov
Sat Dec 23 16:15:12 UTC 2006


Hi,

Last summer(!) Bill Atkins reported of problems with cell-gtk on LW5.0. I 
finally got a chance to look into this. To review: the first time you started 
an application, it ran fine. The second time it wouldn't display, and can 
lock things up. 

I think I fix this. In cells-gtk/gtk-app.lisp function start-app there now is:

(loop while (> (gtk-main-level) 0) do (gtk-main-quit)) 
#+(and Lispworks win32)(loop for i from 1 to 30 do (gtk-main-quit))

The "loop while" is the proper way of doing things, but doesn't work with LW 
win32 (because of a bug in gkt+ ???) that would, at least in LW-created .exe 
files, cause an exited cells-gtk program to go into an infinite loop. The 
second loop (arbitrarily executed 30 times) is used to handle this now. 

This update to cells-gtk/gtk-app.lisp is now in CVS.

On a related note, I found that cells-gtk doesn't work with LWW + Slime, but 
works fine with LWW + Lispworks IDE. (LWL is OK with both IDEs). There is 
code near the above, in gtk-app.lisp, that handles the problem with LWL, but 
apparently has no affect in LWW.

If there is a slime expert here, maybe you could help. Perhaps we could call 
gtk-main using a hook into the  "slime main loop." (Is there such a thing?)


On Thursday 10 August 2006 15:00, Bill Atkins wrote:
> I saw that reader-conditionaled code earlier and thought that perhaps
> 5.0 had fixed whatever problem they were there to correct.
> Unfortunately, even with the plain (gtk-main) call I still got the
> same results.
>
> It baffles me that the test-gtk demo doesn't have this problem, but a
> stripped-down, simpler test case (and the application I'm actually
> trying to run) is causing problems.
>
> Thanks for the reply.  I'll try it with 4.4.6 and see how that fares.
> At least I'll know it's a 5.0 problem if that works all right.
>
> Bill
>
> On 8/10/06, Peter Denno <peter.denno at nist.gov> wrote:
> > On Thursday 10 August 2006 13:26, Bill Atkins wrote:
> > > Is anyone using Cells-gtk successfully on Lispworks 5.0 (32-bit Linux,
> > > in particular)?  I can run my application once, but if I close the
> > > main window and then attempt to run it again, I get "Evaluating..." in
> > > the echo area and no window appears.
> > >
> > > I eventually took part of the test-gtk.lisp code, narrowed it down to
> > > the simplest case and tried that.  It still didn't work.  Strangely
> > > enough, loading the "test-gtk" package and running TEST-GTK:GTK-DEMO
> > > does not have this problem - that is, I can run that as many times as
> > > I like, and I get a window each time.  SBCL, however, seems to handle
> > > both of these without a problem.  I've pasted the source code to my
> > > test case and also the debug output from the first run (ie the run
> > > that works) and from the second run, where LispWorks seems to be
> > > perpetually "Evaluating...".
> > >
> > > Here is the paste: http://paste.lisp.org/display/23932
> >
> > Hi,
> >
> > You might have a look at start-app in root/cells-gtk/gtk-app.lisp. I
> > coded the use of restarts in that code. Despite reading up abot restarts
> > in Practical Common Lisp, I still don't think I quite understand them. So
> > that code is suspect, especially because it has #+lispworks in it. Maybe
> > you could try the code in start-app that currently is #-lispworks. It
> > simply runs gtk-main. The idea of the the #+lispworks alternative (stuff
> > with
> > process-wait-with-timeout) is to give other processes (slime in
> > particular) a chance to run.
> >
> > I don't have LW 5.0 yet so I probably can't be much help.
> >
> >
> >
> > --
> > - Best regards,
> >    Peter
> > _______________________________________________
> > cells-gtk-devel site list
> > cells-gtk-devel at common-lisp.net
> > http://common-lisp.net/mailman/listinfo/cells-gtk-devel

-- 
Best regards,
  - Peter



More information about the cells-gtk-devel mailing list