guile-user
[Top][All Lists]
Advanced

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

Re: how to avoid gtk-standalone-main in guile, when developping


From: Ariel Rios
Subject: Re: how to avoid gtk-standalone-main in guile, when developping
Date: 31 Aug 2001 10:46:55 -0400

On 31 Aug 2001 12:14:27 +0200, David Pirotte wrote:
> Neil Jerram wrote:
> > 
> > >>>>> "David" == David Pirotte <address@hidden> writes:
> > 
> >     David> Hi, Can someone tell me how another way then
> >     David> gtk-standalone-main to launch a gui in guile? this kills
> >     David> the development environment when quitting the app ... (a
> >     David> terrible thing, when you have 15 modules including postres
> >     David> connection ... and just the latest that you work on ...)
> > 
> > I don't quite understand.  Is the problem (1) that you want your Guile
> > REPL to stay alive after the Gtk application has quit and vanished, or
> > (2) that you want to be able to do REPL stuff simultaneously while the
> > Gtk app is alive, or (3) something completely different?
> 
> I'd like to have (1) and (2):
> 
>       - launching guile
>       - using the main module (the one that uses many many others)
>   -->
>  |    - 'launching manually' my app
>  |    - killing the app-main-window to further develop/debug ...
>  |    - 'manually' loading the gui-app-file for modified code

I think you can do what you are trying it with:

(define (window)
  (let ((window (gtk-window-new 'toplevel))
        (button (gtk-button-new)))
    (gtk-container-add window button)
    (gtk-widget-show-all window)
    (gtk-signal-connect button "clicked" (lambda () (gtk-widget-destroy
window)(gtk-main-quit)))
    (gtk-main)))

ariel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]