How to use validatecommand?

Jason Miller jason at milr.com
Tue Nov 17 20:43:45 UTC 2015


Hi Frank,

This looks like a bug; to fix it, search ltk.lisp for "{callback ~a;1}"
and change it to "{callback ~a;expr 1}"

-Jason

On 21:26 Mon 16 Nov     , Frank wrote:
> Hello,
> 
> I'm trying to use the validatecommand of entry. The following code
> throws an error. How do I use it correctly?
> 
> Thanks,
> Frank
> 
> 
> (defun foo ()
>   (with-ltk ()
>     (let ((e (make-instance 'entry :text "hello world!"
> 				   :validate "focusin"
> 				   :validatecommand (lambda ()
> 						      (format t
> "validating...")))))
>       (pack e))))
> (foo)
> 
> #|
> invalid command name "1"
> invalid command name "1"
>     while executing
> "1"
> 	(in -validatecommand validation command executed by .wc)
> |#
> 
> 



More information about the ltk-user mailing list