CLIM mail archive

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

Questions...



    Date: Tue, 28 May 1991 17:29-0400
    From: Mark Nahabedian <naha@yukon.scrc.symbolics.com>
    
        Date: Tue, 28 May 1991 15:40 EDT
        From: Bryan Basham <basham@aio.jsc.nasa.gov>
    
        4) Has anyone implemented a MAC-like metaphor: select one (or more)
           item, then issue a command from a (pull-down?) menu?  For example,
           (using a MAC case) use sh-Left to select (and highlight) several
           documents in Finder; then select the Open command from the File
           menu.  This does not appear to be supported in CLIM as more than
           one object can be selected to issue multiple commands at once.
    
    I'm not aware of one, but it is easy to imagine how to go about it.
    First you need to maintain a list of the objects to be acted upon by the
    next operation.  You need a command which adds an object to that list of
    it is not present and removes it from the list if it is.  Third, a
    presentation translator from the :select gesture (or whichever one you
    like) to the command which maintains the argument list.
    
    This approach has the disadvantage that since the operation is not known
    at the time of argument collection, it can in no way affect the
    selection of arguments (by specifying which kinds of objects it wants to
    operate on) through the use of input context.

In fact, I wrote a CLIM command-loop which presented a set of arguments
and commands, and then let you click on a bunch of args.  Only those
commands which operated on the set of currently selected arguments were
sensitive.  (This was quite un-aesthetic, as far as "Mac-like" interfaces
go.  There was no highlighting of the current selections, etc.  This was
merely a feasibility implementation.)  You could make it go one step
further by restricting argument sensitivity to those arguments which make
sense in combination with the previous selections.  Therefore, if you've
clicked on a printer, pathnames and integers could still be sensitive
(because the Hardcopy File command takes files, printers, and integers
(for the number of copies)), but other things might not be.

(I wrote this in the 0.9 version of CLIM, but it should work with perhaps
minor modifications in 1.0.)

0,,

References:

Main Index | Thread Index