listbox "get" return type

From: Grant Edwards <>
Date: Thu, 6 Oct 1994 17:52:41 -0500 (CDT)

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)


> (.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.
Received on Fri Oct 07 1994 - 00:09:34 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST