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

Accepting values menu



I'm sorry you had so much trouble with this stuff.   It's also
frustrating for us, here at Symbolics Cambridge, especially since so
much has been fixed and improved in 7.2 and people don't quite have it
yet.

The new version of the Book 7A documentation is an extreme improvement
(I was one of the technical reviewers); I think you'll like it a lot.
It has a lot more "concept" documentation, whereas the 7.1 stuff is
almost all "reference".  (The reference documentation is still there, of
course.)

Regarding what you were specifically trying to do, there's no question
that the documentation doesn't properly explain how to do it.  It
certainly looks from the documentation like :CHOOSE-DISPLAYER is what
you want, but DW::ACCEPT-VALUES-CHOOSE-FROM-SEQUENCE always displays
a sequence, and a sequence is exactly what you were trying to avoid.

There's another way to approach this.  If you make your own presentation
type with a printer, the printer overrides any inherited
choose-displayer.  That is, accept-values would rather use a
more-specific printer than a less-specific choose displayer.  The
following example works in 7.2, and if I understand what you're trying
to do, I believe it solves your problem.  Unlike Software Support, I do
not have a 7.1 handy, but I think this will work in 7.1.

(define-presentation-type test-one ()
   :history t
   :abbreviation-for '((alist-member :alist
				     (("One" . one)
				      ("Two" . two))))
   :printer ((thing stream)
	     (princ thing stream))
   :description "Number")

For the Low, High, Default problem, you can do this in 7.2 as follows:

(defun test ()
  (dw:accepting-values ()
    (accept '((token-or-type (Low High Default)
			     test-one)))))

I'm sorry to have to report that this is not likely to work in 7.1.  On
the other hand, I'm happy to report that 7.2 is currently in the "tape
duplication" phase: that is, they're physically duplicating the tapes.
So, it's really and truly getting there.

Sneak leak: I'm also happy to report that Symbolics is about to announce
a change in the source code policy.  All of the formerly-"restricted"
and "optional" sources of the bundled Genera system are going to be
combined into one single product, called something like "Supplemental
Genera Sources".  The product will consist of one tape with all of these
sources.  Anyone can buy it, without any special legal restrictions
(just the usual Symbolics licensing agreement that everybody has already
dealt with).  These are the sources that correspond to Genera 7.2, and
the tape will presumably accompany 7.2 along with all the other software
products. There will be a formal product announcement, and at that time
all the sales reps will get all the details.  (General disclaimer: I may
have stated something slightly wrong, or something; please do not jump
on me.)  I'm really glad we're finally getting rid of restricted sources,
and I hope this will help you in the future.