[cells-devel] Celtk: mk-scrolled-list / Listbox: How to access the current selection ?

Frank Goenninger frgo at mac.com
Sun Nov 18 11:43:49 UTC 2007


Hi all:

(I also attached a screendump, but this most likely is stripped by  
the handler for cells-devel)

I have a listbox created via

(mk-scrolled-list
        :id :pm-list
        :tile? nil
        :parent-x 10
        :parent-y 158
        :tkfont (list "Courier New" 14 'roman 'normal)
        :width 80
        :selectforeground "#FFFFFF"
        :selectbackground "#00257A"
        :list-height 6
        :list-item-keys (c? (pms-as-keys (pm-array-ptr (fm^ :pmutil- 
gui))
                                         (nr-pms (fm^ :pmutil-gui))))
        :list-item-factory (lambda (pm)
                             (when pm
                               (make-instance 'listbox-item
                                              :id :pm-listbox
                                              :fm-parent *parent*
                                              :value pm
                                              :item-text (conc$
                                                          " # "
                                                          (serial- 
number pm)
                                                          " : "
                                                          (call-out- 
device pm)
                                                          ", \""
                                                          (callsign pm)
                                                          "\", FW  
Version: "
                                                          (firmware- 
version pm)))))))

I am trying to access the selection with

(value (fm-other :pm-list ))

but always get NIL - no matter if a line in the listbox is selected  
or not.... I double checked with the demos in lotsa-.widgets but  
could not find any difference from the examples there ...

Any help really appreciated.

Thx -

Frank

P.S.: On the screendump there's the line "Info on selected Power..:" - 
 > The second one of the NILs there is the result of
(value (fm-other :pm-list)) ...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bild 2.png
Type: image/png
Size: 73115 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20071118/168f53d0/attachment.png>
-------------- next part --------------



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20071118/168f53d0/attachment.sig>


More information about the cells-devel mailing list