listbox items change type?

From: Sarah Officer <officers_at_nemesis.tucson.saic.com>
Date: Tue, 30 May 1995 11:12:25 -0700 (MST)

I have noticed that when I insert items into a listbox and then later
retrieve them, sometimes the type of the object has changed.

Eg:

        STk> (listbox ".t.l")
        .t.l
        STk> (pack ".t.l")
        ()
        STk> (.t.l 'insert "end" "abcde")
        ()
        STk> (.t.l 'get 1)
        abcde
        STk> (describe (.t.l 'get 1))
        abcde is a symbol.
        #[undefined]
        
I inserted a string and retrieved a symbol. Surely this is an error?

        STk> (.t.l 'insert "end" (list 'a "bc"))
        ()
        STk> (define x (.t.l 'get 2))
        #[undefined]
        STk> (describe x)
        (a "bc") is a list.
        #[undefined]
        STk> (describe (car x))
        a is a symbol.
        #[undefined]
        STk> (describe (cdr x))
        ("bc") is a list.
        #[undefined]

The string within the list remained a string. This is what I expect.

Sarah Officer
officers_at_aries.tucson.saic.com
Received on Tue May 30 1995 - 20:08:41 CEST

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