CLIM mail archive

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

partial-command-parser



    Date: Mon, 6 Dec 1993 15:19 EST
    From: Hallvard.Tretteberg@si.sintef.no

    I'm using CLIM 1.1 for MCL 2.0. I'm trying to use the value of
    clim:*partial-command-parser*, to fill inn the unsupplied-argument
    of a command. The doc of read-command says: 

    :partial-command-parser
    A function of four arguments, command-table, stream, partial-command and
    start-position.

    For one thing, the order of the arguments must be wrong, because the
    partial command parser tries to find unsupplied arguments in its first
    argument, not the third. In my code, I make a window with
    clim:open-window-stream and give it as the third argument (the stream).
    This gives an error telling me that STREAM isn't an interactive stream. 
    The strange thing is that it often works, it seems the problem occurs when
    the command name looks a bit like other command names in the same command 
    table, as if clim was doing completion behind the scenes or something like that.

There are probably only two people on Earth, or maybe three, who can
write a CLIM partial command parser: myself and Dennis Doughty.  Maybe
Bill York could, too.  From the description given in the CLIM doc, I
would bet that nobody could do it.

    I've tried to give several other arguments as the stream, including the
    standard-input and *query-io*, both give the same error message.
    I also tried using with-input-editing:

    (defun read-unsupplied-arguments (command &optional (frame clim:*application-
    frame*))
	(unwind-protect
	  (let ((new-stream (clim:frame-standard-input frame)))
	    (clim:with-input-editing (new-stream)
	      (funcall clim:*partial-command-parser* command
		       (clim:find-command-table (clim:frame-command-table frame))
		       new-stream 0)
	    ))
	  (setf (clim:window-visibility new-stream) nil))
	)

    This looks better in that no error message occurs, but clim enters an infinite 
    loop, printing out the command name on the stream. The same thing happens when
    new-stream in the code is bound to the result of calling
    clim:open-window-stream.

    So, my question is: How do I make a stream suitable for use by the value of
    clim:*partial-command-parser*? Or perhaps: How do I use the value of 
    clim:*partial-command-parser*?

You supply one of CLIM's pre-supplied partial command parsers, 
COMMAND-LINE-READ-REMAINING-ARGUMENTS-FOR-PARTIAL-COMMAND or
MENU-READ-REMAINING-ARGUMENTS-FOR-PARTIAL-COMMAND.  The names may be
different in CLIM 1.1.

If these aren't what you require, someone at your CLIM vendor might be
able to help you.

I'm sorry I can't offer more direct assistance.

References:

Main Index | Thread Index