From: Stan Pinte <alto_stan@wanadoo.be>
To: guile-user <guile-user@gnu.org>
Cc: guile-gtk <guile-gtk@sources.redhat.com>
Subject: guile-gtk: problem in "insert-text" signal handling.
Date: Fri, 14 Feb 2003 15:06:00 -0000 [thread overview]
Message-ID: <20030214163538.12f31385.alto_stan@wanadoo.be> (raw)
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âÿ¿:6@XB
pãÿ¿¸âÿ¿³@@D@"]
inserted: ["4B
Lâÿ¿:6@XB
pãÿ¿¸âÿ¿³@@D@"]
inserted: ["7B
Lâÿ¿:6@XB
pãÿ¿¸âÿ¿³@@D@"]
inserted: ["8B
Lâÿ¿:6@XB
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: alto_stan@wanadoo.be
next reply other threads:[~2003-02-14 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-14 15:06 Stan Pinte [this message]
2003-03-16 9:06 ` Daniel Skarda
2003-03-31 22:50 ` Kevin Ryde
2003-04-02 0:05 Daniel Skarda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030214163538.12f31385.alto_stan@wanadoo.be \
--to=alto_stan@wanadoo.be \
--cc=guile-gtk@sources.redhat.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).