[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dw question
Anyone have any ideas why this doesn't work?
(using-resource (my-dw dw:dynamic-window TV:MAIN-SCREEN
:momentary-p T :hysteresis 15)
(send my-dw :set-size 600 500)
(send my-dw :expose)
(LET ((*STANDARD-OUTPUT* MY-DW))
(DESCRIBE THING)))
The funny thing is that it prints most of the output, then clears the screen
(?!)
Doing
(using-resource (my-dw dw:dynamic-window TV:MAIN-SCREEN
:momentary-p T :hysteresis 15)
(send my-dw :set-size 600 500)
(send my-dw :expose)
(format my-dw "Foo!"))
or
(using-resource (my-dw dw:dynamic-window TV:MAIN-SCREEN
:momentary-p T :hysteresis 15)
(send my-dw :set-size 600 500)
(send my-dw :expose)
(send my-dw :string-out "Bar!"))
doesn't do anything at all, but expose the window.
Putting (send my-dw :any-tyi) as the last expresion works (you now see the
output), but you can't put output to the window, so moving off it doesn't
return the input context to the last selected sheet. Changing the expose to
select forces you to both type to the window (which clears it) and then move
off it. Following other examples, I ended up doing
(LET ((MESSAGE (CONCATENATE 'STRING (with-output-to-string (stream) (LET ((*STANDARD-OUTPUT* STREAM))
(DESCRIBE THING)))
(FORMAT NIL "~%Press Any Key to Continue."))))
(USING-RESOURCE (MY-DW tv::POP-UP-TEXT-WINDOW-WITHOUT-MORE TV:MOUSE-SHEET)
(SEND MY-DW :CLEAR-INPUT)
(SEND MY-DW :SET-LABEL "Description")
(SEND MY-DW :SET-VSP 1)
(SEND MY-DW :SET-SIZE-IN-CHARACTERS MESSAGE MESSAGE)
(tv::EXPOSE-WINDOW-NEAR MY-DW '(:MOUSE) NIL)
(tv::WINDOW-CALL (MY-DW :DEACTIVATE)
(SEND MY-DW :STRING-OUT MESSAGE)
(SEND MY-DW :ANY-TYI))))
which works fine, and does a couple other nice things too (like size the
window appropriately), but I still don't understand why none of the former
attempts worked. Is this non-intuitive or am I just wedged?
----
Brad Miller U. Rochester Comp Sci Dept.
miller@cs.rochester.edu {...allegra!rochester!miller}
- Follow-Ups:
- 1dw question0
- From: MMcM@TITANIA.Oberon.Dialnet.Symbolics.COM (Mike McMahon)