CLIM mail archive


two questions revisited

    Date: Fri, 3 Apr 1992 13:08 EST
    From: "William M. York" <>

	Date: Fri, 3 Apr 1992 00:14 PST

	I'm using CLIM 1.0 and MCL 1.0 (both beta). First I define som
	presentation types and a present method:

	(clim:define-presentation-type model-&-label ())

	; (defclass node (model-&-label)) ; make node a subclass of model-&-label
	(clim:define-presentation-type node ())

	(clim:define-presentation-method clim:present
	  (obj (type model-&-label) stream (view clim:textual-view) &key)
	  (print-without-type obj stream))

	Then I make an accept method, which is supposed to get a value from a
	homemade cut-buffer:

    [method that calls presentation-replace-input]

	As state in the code, clim:presentation-replace-input does not use my
	own present method but one that calls print-object. Using present with
	the same argument works but then the output of course isn't put into
	the input-buffer. Help!

    Is there any chance that your PRESENT method (or your
    PRINT-WITHOUT-TYPE function) could be getting an error?  Maybe
    when it is asked to write to a string?  The
    your arguments inside a HANDLER-BIND that catches errors.  If an
    error is detected, it falls back on PRINC-TO-STRING, which would
    give you the Lisp-object representation.

That's a good point.  Note that CLIM will probably let you know that
this happened by doing the output in italics.

    You can check this pretty easily under Genera by enabling the
    condition-tracing mechanism around one of your calls:

    Enable Condition Tracing ERROR

    You may find that you trap other errors that you weren't looking
    for.  Just hit Resume in those cases.


Main Index | Thread Index