[mcclim-devel] Patch for DREI input editor

Troels Henriksen athas at sigkill.dk
Thu Mar 8 21:14:28 UTC 2007


Robert Goldman <rpgoldman at real-time.com> writes:

> I attach a patch file.  Unless someone finds a mistake, I will commit it
> tomorrow before the weekend.

Actually, the code works fine (though perhaps a bit illogical, I just
adapted it from Goatee) - `present-acceptably-to-string' is only
supposed to return a non-NIL object if the textual output is NOT
acceptable. If we can represent the object as a string, we have no
need for the object information. See `presentation-replace-input' just
below the definition of `present-acceptably-to-string'.

As I hope minion told you on #lisp, the problem is that Drei has to
invoke magic in order to figure out whether the textual output of a
presentation method can be accepted back in by an accept method (and
if it can't, insert a literal object instead of text). CLIM has no
formal way for a presentation method to say "no, I cannot fulfill your
request for output with :acceptably t", and hence Drei (and Goatee)
tries to wing it by assuming/hoping that presentation methods will
signal an error if they are provided with a true value for the
:acceptably keyword parameter, yet cannot actually perform textually
acceptably output. This is the case for the default fall-through
presentation method, but it's very likely to malfunction for
user-defined presentation methods.

-- 
\  Troels
/\ Henriksen



More information about the mcclim-devel mailing list