Using STk 2.1, I've noticed that when a listbox widget is given a
"get" command it doesn't return a string, but rather returns an atom
or a list depending on what the string is.
For example:
> (listbox '.l)
> (.l 'insert 0 "Hi there")
> (.l 'insert 0 "#todo")
> (.l 'insert 0 "arf")
> (pack .l)
> (.l 'get 0)
arf
> (.l 'get 1)
(#t odo)
> (.l 'get 2)
(|Hi| there)
However, an entry widget, which always returns a string when given the
"get" command:
> (entry '.e :width 12)
> (.e 'insert 0 "Hi there")
> (.e 'get)
"Hi there"
> (.e 'insert 0 "#todo")
> (.e 'get)
"#todoHi there"
Personally, I would prefer that listboxes always return a string the
same way that an entry widget does. I am thinking about changing the
handling of the listbox "get" to make it work like the entry "get." Is
there some reason that I should leave it alone?
--
Grant Edwards
Rosemount Inc.
grante_at_rosemount.com
Received on Fri Oct 07 1994 - 00:09:34 CET