CLIM mail archive

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

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



    Date: Tue, 1 Sep 1992 22:31 EDT
    From: "Donald H. Mitchell" <dmitchell@trc.amoco.com>

    CLIM 1.1 Genera 8.1

    I noticed something odd and was wondering whether anyone has a fix.  I define two
    presentation types and give each an accept method (using completing-from-suggestions),
    and then do an accept on '(or one-type the-other).  If I type sufficient to uniquely
    identify an object from the first type (one-type) and hit <tab>, it completes.  If I try
    for an object from the second type (the-other), the first time I hit <tab> nothing
    happens; if I immediately hit it again, then it completes.  After hitting it twice, it
    keeps working for either type (within the same accept call).

It doesn't surprise me that, in the second case, hitting <Tab> doesn't
complete from the second completion set.  It surprised me at first that
hitting <Tab> a second time completed from the second set, but then I
realized that this is the "expected" behavior.  It really surpises me
that hitting <Tab> after that completes from either set; I don't see how
that can happen.

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


0,,

Follow-Ups: References:

Main Index | Thread Index