This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gtk-standalone-main


Ariel Rios wrote:
> 
> El 17 Apr 2001 22:57:33 +0200, rm@mamma.varadinet.de escribió:
> > On Tue, Apr 17, 2001 at 01:01:54PM -0400, Ariel Rios wrote:
> 
> > Not on my system, unfortunately ;-(
> > The call to gtk-widget-show-all will return 1 but
> > no widget apears on the screen. Only after the call
> > to gtk-standalone-main does the widget show.
> Which is your platform, guile-gtk and guile's version?

I had exactly the same problem and I was going to post a message, as I now
understand why I was unabble to discover by myself the solution Ariel proposed

I think there is a little difference between launching guile and loading the
module gtk or launching guile-gtk. here is an example of what happens on my
machine:

1.	;; first launching guile-gtk
	david@faust:~/alto/projects/guile/tactus 95 $ guile-gtk
	gtk> (use-modules (alto test))
	gtk> (test-gui)
	gtk> 

==>	;; the window is realized and comes to the display normally


2.	;; launching guile
	david@faust:~/alto/projects/guile/tactus 93 $ guile
	guile> (use-modules (alto test))
	guile> (test-gui)

==>	;; nothing happens, until I exit guile
	guile> (exit)
==>	;; the window is realized but of course only remains a fraction
	;; of a second on the screen

hope it helps
david


;; assuming the module (alto test) contains the following
(define-module (alto test)

  ;; from distribution
  ;; :use-module (database postgres)
  ;; :use-module (ice-9 format)
  :use-module (gtk gtk)

  ;; from alto
  ;; :use-module (alto gtk-utils)

  )

(export test-gui)


(define (test-gui)
  (let ((window (gtk-window-new 'toplevel))
	(button (gtk-button-new-with-label "Hello")))
    (gtk-container-add window button)
    (gtk-signal-connect button "clicked" 
			(lambda () (gtk-widget-destroy window)))
    (gtk-widget-show-all window)
    ))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]