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]

how NOT to "focus_out" of an entry ?


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


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