[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Define command question
Date: 13 Jul 88 17:06 EST
From: STERRITT%SDEVAX.decnet@ge-crd.arpa
Hello,
I have been trying to get a simple Program Framework put together,
and have run into an annoying thing. The problem is that I have a flavor,
called Scenario-Flavor, that I want to have commands operate on. So, I
define a command for my frame that accepts an instance of this flavor, and
since there is a pane with all of the available ones listed, this works
fine as long as you do something like:
Framework Command: Examine Scenario <mouseclick>
BUT, if you hit two spaces after the word scenario, I get a line below the
command line that says "End of file for #<window description>", and if I
hit anything else, it gets into an infinite loop with this text flashing
below the line. I'm doing this under 7.1, but 7.2 gives a similar message,
without the infinite loop.
The command definition just asks for an instance of the flavor,
and I've defined a sys:print-self method for the flavor.
Anybody know what I can do to avoid this? Obviously, it's not an
error one sees with the regular commands.
thanks,
chris sterritt
sterritt%sdevax.decnet@ge-crd.arpa
Because you have defined no way of parsing a printed representation of
Scenario-Flavor, the system is defaulting to reading an expression. You
should define a presentation type called Scenario-Flavor whose parser
either
a) if smart knows how to parse a printed representation and turn it into
an object
b) if dumb simply loops doing dw:read-char-for-accept, thereby
guaranteeing that no printed representation can be read, but mouse
clicks will still grab the objects.
You should read the documentation on presentation types.