[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile-gtk: problem in "insert-text" signal handling.
From: |
Stan Pinte |
Subject: |
guile-gtk: problem in "insert-text" signal handling. |
Date: |
Fri, 14 Feb 2003 16:35:38 +0100 |
hello,
with the following program, I am getting garbage from the "new-text" variable,
when introducing the second and following characters...
Is this a bug in guile-gtk-1.2-0.31, or am I only supposed to use the first
charachter of the string?
thanks a lot,
Stan.
output:
inserted: ["2"]
inserted: ["3B
Lâÿ¿:address@hidden
pãÿ¿¸âÿ¿³@@D@"]
inserted: ["4B
Lâÿ¿:address@hidden
pãÿ¿¸âÿ¿³@@D@"]
inserted: ["7B
Lâÿ¿:address@hidden
pãÿ¿¸âÿ¿³@@D@"]
inserted: ["8B
Lâÿ¿:address@hidden
pãÿ¿¸âÿ¿³@@D@"]
test program:
(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: [~s]~%" new-text)
(format #t "not text!!!~n"))))
(gtk-widget-show-all window)
(gtk-standalone-main window))
--
Stanislas Pinte
Computer Consultant
98, rue Bois l'Evêque
B-4000 Liège
web: http://www.altosw.be
email: address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile-gtk: problem in "insert-text" signal handling.,
Stan Pinte <=