CLIM mail archive

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

Re: Accept with '(or...) types that have accept methods




[...]

>Background: the OR type is implemented by looping over the component
>types and running the ACCEPT method for each of components.  If one type
>"fails" (by signalling a parse-error), the next type is tried.  So it's
>pretty easy to see what hitting <Tab> twice uses the second completion
>set -- the first <Tab> signals a parse-error, and the second <Tab>
>completes from the next completion set.
>
>    (I can send a simple example code to anyone who wants it.)
>
>    Don Mitchell			dmitchell@trc.amoco.com
>    Amoco Production Company	(918) 660-4270
>    Tulsa Research Center
>    P.O. Box 3385, Tulsa, OK 74102

As Jeff Morill has pointed out, this simple aproach doesn't deal
correctly with completions - they should be merged for the or-type to
prevent a too early completion.

However, can't this simple or-parser be somewhat more user-friendly by
pushing the gesture that caused the parse-error back on the stream (via
unread-gesture or something) before trying the next type? No user will
understand (nor want's to understand) why he should press TAB two times
to complete the second type (He even doesn't know of a "second one").
Guess what he thinks if he completes the 23rd type?

Stefan B.

berni@iml.fhg.de

0,,


Main Index | Thread Index