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

A question about dw:define-program-framework



I have written the following code (some of the unimportant
details have been removed):

(dw:define-program-framework salash
  :pretty-name "Salash"
  :command-definer t
  :command-table (:inherit-from '("global") :kbd-accelerator-p t)
  :panes ((command-menu :command-menu)
          (salash-output :display <<some stuff deleted>>)
          (salash-input :interactor <<some stuff deleted>>)
          (listener :listener <<some stuff deleted>>))
  :selected-pane listener
  :query-io-pane listener
  :terminal-io-pane listener
  :label-pane listener
  :configurations <<some stuff deleted>>
  :state-variables ((my-memory nil))
  :select-key #\s
  :system-menu t
  :help #'salash-helper)

Now here comes several questions:

1) How do I change the prompt in the listener pane from "Salash command:"
to si:arrow-prompt.

2) If there are several configurations how can I specify which one is
the default to be used when the frame is created by <select> S.
I tried using the keyword ":configuration 'config2". There was no
complaint but the system persisted in using the configuration
mentioned first in the :configurations list.

3) Some of the configurations I am using have a single line command menu
along the top, while others have a single column command menu along the
right. When I send a :set-configuration message to the frame, the
menu contents are not reformated. How can I reformat the the menu to
match the row/column specs of the configuration.

4) The listener pane at present accepts both accelerated commands
and command-menu clicks. It does not allow me to type either
other commands (the inherited global command table) or lisp forms.
How can I get it to do that?

5) I would like to be able to select the :interactor pane salash-input
to supply input to another process which will read from that pane.
(And then be able to select the :listener pane when I want to type
commands or lisp forms for debugging purposes. When I type <select> S
I don't really care which pane gets selected.)
At present, I can't click left on that pane to select it (it beeps).

6) There is a bug in the documentation. The keyword :label-pane
appears as :label and in any case doesn't work. If I have
":label-pane listener" and listener has :margin-components
containing dw:margin-label, this label never gets set to the
name (and instance number) of the this program (i. e. "Salash 1")

7) I would like the ability to control what appears in the
mouse documentation line for the entry in the System menu.

8) I would like the ability to control what appears in the
mouse documentation line for the entry in the Create menu
called from the System menu.

9) I would like the ability to control what appears in the
mouse documentation line for the entries in the command menu pane
created by define-salash-command. Also only mouse-L and mouse-R
seem to work for command menu entries, why not mouse-M as well?
How can I control how (shifted) mouse buttons on command menu pane
entries map to different (or the same) commands?

10) At present, both command accelerators and clicks on command menu
pane entries cause the command name to be echoed in the listener
window. How can I have them not echo?

11) There are many cryptic references to different command tables
in the documentation, but none of them are documented anywhere.
What are "global", "user", "colon full command", "standard arguments",
"standard scrolling"? What commands do they contain? Are there any
other command tables I should know about?

12) I would like *package* to be bound to the package SALASH whenever
I select a salash program frame for the first time with the possibility
of changing it through the :Set Package command in the :listener pane
of the salash program, but that not to affect the *package*
settings of other windows/processes much in the same way that
Dynamic Lisp Listener 1 and Zmacs can have different packages and be
set independently and Zmacs always comes up the first time in CL-USER
no matter whatever the package setting in Dynamic Lisp Listener 1 is.

In general I find the documentation for the new window system to be very
cryptic. Once I get the answers to above questions, I am sure I will
have more questions before I get my program to work.
        Jeff

P.S. A while back there was some mail on SLUG that described a way to
have a :listener window in a program frame accept commands, lisp forms,
and strings (for a natural language system) as input. I tried that
code (which was suggested by someone as Symbolics) and it didn't work.
What I would like is a supported and well documented top level
interface for program frames with the following capabilities:

1) If I type anything prefixed with a colon ":" it is treated as a
command. That is it is parsed and evaluated as a command. The colon
should be striped before command processing.

2) If I type anything prefixed with a comma "," it is treated as a
lisp form. That is it is parsed and eval'ed. The comma should be
stripped before command processing.

3) If I type anything beginning with certain characters such as "("
or "*" it should be treated as a lisp form. That is it is parsed
and eval'd. The initial character should NOT be stripped.

4) If I type anything beginning with alphabetic characters then it
is treated as a character string to be read by READLINE and then
passed on to back to me for processing by my natural language processor.

5) If I type anything beginning with a question mark "?" the it is treated
as a Prolog query. That is it is parsed and processed according to the
specs of (perhaps my non-Symbolics) Prolog. The question mark should be
stripped before processing.

6) Command accelerators and clicks on command menu panes should still
work.

In general, what is needed is a generalized dispatching capability
which can dispatch BOTH to different input parsers as well as to
different evaluation routines (maybe even different printing routines)
depending on the first character typed (with control over whether
that first character is or is not part of the string to be processed)
while still supporting the full input editing/completion afforded by
different input parsers. I have tried, and failed to achieve the
above functionality. At various times I achieved parts of it but
most of that code was for Release 6.1 and since I no longer have
the sources for Genera 7.1 I can't update the code.