[ltk-user] PATCH: added ttk:: namespace to tcl style commands
Johan Ur Riise
johan at riise-data.no
Sun Apr 27 16:35:11 UTC 2008
sø., 27.04.2008 kl. 13.23 +0200, skrev Johan Ur Riise:
> (tile-test) would sometimes hang on the first command without this
>
> debian sid
> sbcl 1.0.16.3
> wish 8.5
>
> added ttk:: namespace to tcl style commands
>
>
> diff --git a/ltk-tile.lisp b/ltk-tile.lisp
> index d33bceb..024d118 100644
> --- a/ltk-tile.lisp
> +++ b/ltk-tile.lisp
> @@ -43,18 +43,18 @@
> (setf (widget-class-name w) (concatenate 'string
> "ttk::" (widget-class-name w)))))))
>
> (defun theme-names ()
> - (send-wish "senddatastrings [style theme names]")
> + (send-wish "senddatastrings [ttk::style theme names]")
> (ltk::read-data))
>
> (defun use-theme(name)
> - (format-wish "style theme use ~a" name))
> + (format-wish "ttk::style theme use ~a" name))
>
> (defun style-element-names ()
> - (send-wish "senddatastrings [style element names]")
> + (send-wish "senddatastrings [ttk::style element names]")
> (ltk::read-data))
>
> (defun style-default (style &rest params)
> - (format-wish "style default ~A ~{ -~(~a~) {~a}~}" style params))
> + (format-wish "ttk::style default ~A ~{ -~(~a~) {~a}~}" style params))
>
> (defun tile-test ()
> (with-ltk ()
> @@ -71,7 +71,3 @@
> (make-menubutton mtheme theme (lambda ()
> (use-theme theme)))))
> )))
> -
> -
> -
> -
> \ No newline at end of file
Seems like this is not the end solution.
It seems that
1) tcl/tk version 8.4 needs the command 'package require tile' but 8.5
does not
2) moving of (activate-tile) to the inside of (with-ltk) in (defun
tile-test) was ok for 8.5, as that version does not require require...,
and the "package require tile"-command is executed in the
*init-wish-hook*.
3) both 8.4 and 8.5 is fine with qualifying the commands with the ttk
namespace.
So I get it to work with 8.5, but in 8.4 i still have either a missing
"package require" or the error message from the first mail. Have to
think of something else.
More information about the ltk-user
mailing list