close Warning: Can't synchronize with repository "(default)" (/project/mcclim/svn does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 18 years ago

Closed 17 years ago

#1 closed defect (fixed)

Bug in handling of delimiter/completion gestures in McCLIM input editing

Reported by: Troels "Athas" Henriksen Owned by: Troels "Athas" Henriksen
Priority: major Milestone:
Component: general Version:
Keywords: Drei, input-editing Cc:

Description

Observe the following presentation type definition:

(in-package :clim-user)

(define-presentation-type unacceptable ())

(define-presentation-method accept
    ((type unacceptable) stream view &key)
  (with-delimiter-gestures (#\Space)
    (list (accept 'package :stream stream :view view :prompt nil)
          (accept 'package :stream stream :view view :prompt nil))))

Using Drei, doing (accept 'unacceptable) will work while accepting the first package, but when you press space to accept the second one, a debugger will pop up and inform you that you did not provide any input, and that there is not a default value. I think the problem is that the delimiter gesture is "re-evaluated" as a terminating delimiter gesture. The problem does not show up with Goatee, because Goatee implements a non-standard hack with which you can inhabit rescanning by providing :rescan nil as argument to replace-input. This is used in the completion done when pressing space after entering the first package name. I don't think the McCLIM input editing routines should expect input-editing-streams to implement nonstandard hacks in order to work properly, but I haven't yet been able to figure out how to fix this. In case anyone is interested, I think the buggy function is complete-input. At least, that's where the replace-input-call is. This is a very serious problem that prevents Drei from being able to accept many interesting presentation types, including some seen in classic CLIM applications.

Change History (2)

comment:1 Changed 18 years ago by Troels "Athas" Henriksen

Owner: changed from somebody to Troels "Athas" Henriksen

comment:2 Changed 17 years ago by Troels "Athas" Henriksen

Resolution: fixed
Status: newclosed

Fixed by implementing the Goatee-style hack. You need to be careful when using it, but you can only harm yourself, so perhaps it's not too bad. "I wonder what classic CLIM does."®

Note: See TracTickets for help on using tickets.