[ltk-user] LTK improvements

Jan Rychter jan at rychter.com
Tue Nov 28 15:06:08 UTC 2006


[...]

> (defmethod selection-ranges ((text text))
>  (format-wish "senddatastring [~a tag ranges sel]" (widget-path text))
>  (read-data))

Just as a side note, in my changes I've implemented:

(defgeneric tag-ranges (txt tag))
(defmethod tag-ranges ((txt text) tag)
  (format-wish "senddatastring [~a tag ranges ~a]" (widget-path txt) (tag-to-string tag))
  (tcl-string-to-list (read-data)))

which you can call as (tag-ranges txt :selection) and get the ranges as
a list, instead of a string (which I found inconvenient).

--J.



More information about the ltk-user mailing list