[plt-scheme] post-script-dc% weirdness
I'm trying to save a bitmap being displayed on a GUI canvas% as a
PostScript file. I do something like this:
(define save-to-postscript-file
(lambda ()
(let [(psfile (new post-script-dc%
(interactive #t)
(use-paper-bbox #t)))]
(if (send psfile ok?)
(begin
(send psfile start-doc "Rendering...")
(send psfile draw-bitmap (send my-buf-dc get-bitmap) 0
0)
(send psfile end-doc))))))
This is on Mac OS 10.3.8, DrScheme 299.27. I have a menu item in my
GUI to invoke this function. When I invoke it, I get the PostScript
Setup window, then the OS X save-file dialog. I choose a file, hit
save, and then my GUI window comes back into focus. Well, the titlebar
does. The buttons and choices are all grayed out. The choices come to
life again when I use them, the canvas is fine, but the buttons remain
grayed out and unclickable until I switch to another window and back
again, at which point they spring to life and are okay. How can I
avoid this paralysis? Thanks. --PR