This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
how NOT to "focus_out" of an entry ?
- To: guile-gtk <guile-gtk at sourceware dot cygnus dot com>, "guile-user at gnu dot org" <guile-user at gnu dot org>
- Subject: how NOT to "focus_out" of an entry ?
- From: David Pirotte <david at altosw dot be>
- Date: Thu, 11 Oct 2001 12:50:58 +0200
- Organization: Alto Sotware (http://www.altosw.be)
Hello,
i need to force the user to stay in a particular entry, if and while
the entry does not vlideta a condition, for exemple a valid string
date format
i tried the following, but was unsuccessfull, the system does not
stay on the entry that i wish ot would, the one the user was trying
to get out:
;; just for the example
(define (str-valid-dte? date-str)
#f)
(gtk-signal-connect entry "focus_out_event"
(lambda (a)
(let ((date-str (gtk-entry-get-text entry)))
(if (str-valid-dte? date-str)
#t
(begin
(system "beep")
==> is this the correct way? (gtk-widget-grab-focus entry)
)))))
thanks
david