CLIM mail archive


presentation-replace-output & clim:*command-unparser*

    Date: Thu, 11 Jun 1992 14:38 EDT

    I'm using CLIM 1.0 and MCL 2.0b1p3 and have two questions.

    The first concerns presentation-replace-output. I have the following code:

    (clim:presentation-replace-input stream chosen-object type clim-view
				:buffer-start (1- (clim::input-position stream)))
    ; OBS! I'm using a undocumented clim function  ^^^^^^^^^^^^^^^^^^^^

    The function is documented to have a :buffer-start keyword which tells
    which part of the buffer to replace. The default is
    (clim::input-position stream), but I want to erase the last character,
    hence the use of 1-. The problem is that clim::input-position is
    undocumented, can I have the same effect using a documented function.
    It seems strange to document the keyword argument when there is no
    useful documented way of using it.

It's exported in CLIM II.

    The second question concerns unparsing commands. I read commands
    myself and want to echo them using the standard unparser:

    (funcall clim:*command-unparser* (clim:find-command-table
					(clim:frame-command-table frame))
				      stream command)

    However, I get an error:

    > Error: value NIL is not of the expected type
    > Type Command-. to abort.
    See the RestartsI menu item for further choices.
    1 > 

    The backtrace reveals a call to clim:present that somehow gets nil as
    the type specifier. A have checked that the command given to the
    unparser is a legal command. Am I using the clim:*command-unparser*
    wrong? In case, what should I do? Bug? Where?

Why not just use this:

 (present command `(command :command-table ,(frame-command-table frame))
	  :stream stream)


Main Index | Thread Index