CLIM mail archive

[Prev][Next][Index][Thread]

Re: Funny accepting-values dialog case



    Date: Wed, 11 Dec 1991 15:40 PST
    From: Curt Eggemeyer <curt@eraserhead.jpl.nasa.gov>

    If in your application frame you do something like this (assuming your in the
    clim package or using it):

    (define-your-application-command (com-test-subset :name t) ()
       (let ((test '(2)) (*stream* (frame-query-io *application-frame*)))
	    (accepting-values (*stream*)
		    (setq test (accept (cons 'subset '(1 2 3 4 5))
				    :stream *stream* :default test
				    :prompt "Input")))))

    I found that for the accepting the subset presentation type you have
    a funny case of how it unhighlights or unbolds the selected items from
    the list.

    If you deselect the item that was most recently selected it works fine!

    Now Select multiple items.  Lets say you selected 3 4 5 so now you have
    2 3 4 5 selected.   Now try to deselect any item other than 5 (or
    the last one selected), you have to multiply click the mouse on
    that item three times to get it to deselect it.  This is weird!

I've seen exactly that symptom but in a different light.  I had thought the
problem was related to a bug in something I built on top of SUBSETs.

Note that the item is deselected but not unhighlighted after the first
click.  Then it is reselected by the second click and unhighlighted and
deselected by the third click.

I just tracked down the problem.  Suppose you start off with a default
of 2 and then click on 3.  FIND-OR-ADD-QUERY gets called with a cache value
of (3 2).  Then you click on 2 (to turn it off).  FIND-OR-ADD-QUERY gets
called with (2) *but* this is EQ to the previous (3 2).  So it finds the
display associated with the (3 2) and displays it.

The fix seems to be to change the DELETE in AVV-CHOOSE-SOME-OF-1 to
REMOVE (if you have sources).   (There may be more efficient fixes but
I leave that to the developers.)

0,,

References:

Main Index | Thread Index