[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: closing an application




Quoting "Matthew Flatt"

> Quoting "Maurizio Ferreira":
> >    (yield (make-semaphore 0)))
> >
> > [...]
> >
> > The problem is that the window is hidden, but the application does not
> > stop.
>
> I think you want to get rid of the above line.
>
> MrEd will continue to run as long as a window is open, or as long as
> code in the main thread is still executing. In the your example `(yield
> (make-semaphore 0))' never returns --- that is, it never stops
> executing --- in the main thread, so MrEd can't exit.
>
> Matthew
>
Thanks, it works.
I've also removed the line
  (override [on-close exit])
in the construction of the frame.
I've blindly copied the source from the "Games" program
I've tought the line
    (yield (make-semaphore 0)))
was necessary to avoid the emission on a console of the messages related to
the construction
of the objects, and that to exit the program was necessary to override the
Onclose event.
Now i suppose the messages are removed by the
(invoke-unit/sig (unit-sig ...
construct.
The manuals are not much clear about such topics...

Maurizio