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

Accept problem

    Date: Mon, 22 Jun 1992 12:33 PDT
    From: jbarnett@charming.nrtc.northrop.com

    A while ago, I sent the following question/problem to SLUG.  I got only one
    response that confirmed that (1) yes, the problem exists and (2) it exists
    on a machine that has just been cold booted.  From the lack of help, I
    thought that maybe my msg got lost.  So I'm trying again:

Hmmm, I sent a response when you first asked, but I guess that it got
lost in the mail.  Fortunately, my mail-handling machine has been up
for almost eight weeks, so I was able to retrieve this from the "Sent
Drafts" list:

    Date: Thu, 21 May 1992 09:42 PDT
    From: jbarnett@charming.nrtc.northrop.com

    If I evaluate
      (accept '((token-or-type (("None" . :none)) net:printer) :default :none))
    I get the following on the terminal
      Enter a printer or None [default None]:
    If I hit return, the value is the default object (last input) of type printer,
    i.e., the specified and displayed default is not used.  In addition, evaluating
      (accept '((or (member :none) net:printer)) :default :none
	      :default-type '((member :none)))
    produces the same problem -- the displayed default is None but the value is
    a printer.  If I substitute another namespace type, e.g., net:host, for
    net:printer, the same glitch occurs.  However, if I substitute integer, the
    correct behavior results.  Any explanations and/or fixes would be greatly

This is pretty odd.  In the course of examining this, I was able to
duplicate your problem.  I thought it had something to do with the
parser for the NET:OBJECT presentation type (a supertype of both
NET:PRINTER and NET:HOST) explicitly supplying a default in its
recursive call to ACCEPT.  But when I put some debugging code in the
problem went away!  I tried it on another (freshly-booted) machine and
your example worked right out of the box.

You might try recompiling the NET:OBJECT presentation type.
Alternatively, you might try the "internal" presentation type

      (scl:accept '((scl:token-or-type (:none) dw::local-printer)) :default :none)

which seems to work for me.