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

problems with disabled default buttons and sequence-dialog-items




To the MCL 1.3.2 community:

Hello everyone.  I am hard at work here at the University of
Michigan, finishing up the new version of our Pascal Programming
environment called SODA.  We have a few lingering problems 
with MCL 1.3.2.  One of them might be easily fixed while the 
other seems to be causing us some problems.

1.  Default Buttons and the return key...

We have found the following problems with the default button of
a window.  The problems are is as follows:  If you have a 
disabled button that is the default button for a window, clicking
on the button does nothing but pressing the return key executes
the dialog-item-action associated with the button.  If there
is no dialog-item-action associated with the return key, pressing
the return key first activates the button such the mouse can now
be used within the button.

Here is a tiny sample of code that demonstrates this problem.

(modal-dialog
 (oneof *dialog*
        :window-type :document
        :window-position #@(426 100)
        :window-size #@(201 105)
        :dialog-items
        (list (oneof *button-dialog-item*
                     :dialog-item-position #@(103 70)
                     :dialog-item-size #@(62 16)
                     :dialog-item-text "OK"
                     :default-button t
                     :dialog-item-enabled-p NIL
                     :dialog-item-action 
	             ; remove this code to see how the return key
	             ; just enables the button for mouse clicks
                     (nfunction dialog-item-action
                                (lambda ()
                                  (usual-dialog-item-action)
                                  (return-from-modal-dialog T)))))))

end of code


2.  Activating the scroll bars automatically

We have a sequence-dialog-item that displays a trace of the Pascal
program as it executes.  This window is updated while the program
is running, regardless if this window is the active window.  The
sequence-dialog-item has enough room for about 7 entries.  Even
a simple program will create more than 7 entries.

Let's assume that we have added 15 entries to the dialog-item 
(through calls to 'set-table-sequence).  We would expect the dialog
item to have scroll bars displayed when it is activated, but the
scroll bars are only displayed if you click on the mouse and try to
scroll past the window.  This is rather annoying, and in our first
few tests with the high school students they did not understand that
to be able to scroll the window they had to "try" to scroll the
window first.  The real confusion lies if you have just enough
dialog items in the window to fill it but not scroll it.  You are
left wondering if the window will scroll because there are a lot
of dialog items or ????

Please advise if anyone has some code or better interface techniques
to manage this problem. 

Thanks!

  -- Luke