From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17144 invoked by alias); 16 Feb 2003 15:14:40 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 17137 invoked from network); 16 Feb 2003 15:14:40 -0000 Received: from unknown (HELO maho3msx2.corp.emc.com) (128.221.11.32) by 172.16.49.205 with SMTP; 16 Feb 2003 15:14:40 -0000 Received: from pablo (10.68.1.134 [10.68.1.134]) by maho3msx2.corp.emc.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 1PRKDVP3; Sun, 16 Feb 2003 10:14:39 -0500 Date: Sun, 16 Feb 2003 15:14:00 -0000 From: Stan Pinte To: guile-user Cc: guile-gtk Subject: bug in focus management Message-Id: <20030216164417.19e791d2.alto_stan@wanadoo.be> Reply-To: alto_stan@wanadoo.be Organization: Alto Software Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2003-q1/txt/msg00010.txt.bz2 hello, I guess we have a bug in our focus management code, in guile-gtk-1.2-0.31. Indeed, when a widget has the focus, a call to (gtk-widget-get ref-entry 'h= as-focus) returns #f. the following code should proof the point. Any idea? thanks a lot, Stan. (use-modules (ice-9 format)) (use-modules (gtk gtk)) (let ((window (gtk-window-new 'toplevel)) (button (gtk-button-new-with-label "Say Hello")) (ref-entry (gtk-entry-new))) (gtk-widget-set-name button "mybutton") (gtk-widget-set-name window "mywindow") (gtk-window-set-title window "Guile-Gtk: Hello World") (gtk-container-border-width window 10) ; (gtk-container-add window button) (gtk-container-add window ref-entry) (gtk-signal-connect ref-entry "insert-text" (lambda (new-text new-length position) (if (string? new-text) (format #t "inserted: [~c]~%" (string-ref new-text 0)) (format #t "not text!!!~n")))) ;;;shows the problem (gtk-signal-connect ref-entry "focus-in-event" (lambda (entry) (format #t "focused [~A]. Has focused: ~A ~%"=20 ref-entry (gtk-widget-get ref-entry 'has-focus)))) ;;;end of problem (gtk-widget-show-all window) (gtk-standalone-main window)) --=20 Stanislas Pinte Computer Consultant 98, rue Bois l'Ev=EAque B-4000 Li=E8ge web: http://www.altosw.be email: alto_stan@wanadoo.be