Lisp HUG Maillist Archive

does (setf capi:collection-items) reliably modify capi:choice-selection ?

Hi all (and particularly LW people),

If I have a capi:choice C with a selection, and I do

  (setf (capi:collection-items C) '())

can I depend on

   (capi:choice-selection C)

returning NIL afterward?

Thanks in advance,  //JT

-- 
=====================
Joshua Taylor
tayloj@cs.rpi.edu, jtaylor@alum.rpi.edu

"A lot of good things went down one time,
  back in the goodle days."
    John Hartford


Re: does (setf capi:collection-items) reliably modify capi:choice-selection ?

Joshua TAYLOR wrote on Thu, 27 Aug 2009 21:29:20 -0400 05:29:

| If I have a capi:choice C with a selection, and I do
| 
|   (setf (capi:collection-items C) '())
| 
| can I depend on
| 
|    (capi:choice-selection C)
| 
| returning NIL afterward?

I think this depends on :keep-selection-p. Nevertheless, I would write

 (setf (capi:choice-selection C) nil
       (capi:collection-items C) '())

to be on the safe side.
--
Sincerely,
Dmitriy Ivanov
lisp.ystok.ru


Updated at: 2020-12-10 08:40 UTC