This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

kawa -w now Swing-based


I've converted/re-written the window created when you start Kawa
with the -w flag to use the Swing JTextPane class rather than the
AWT TextArea class.  (This is SVN only so far, of course.)

The most obvious advantage is that it can use different "styles" for
prompt, input, error-port, and output-port.

A less obvious advantage is that you can "print" a Swing/AWT
component, and it gets embedded in the "output".  For example:

#|kawa:1|# (define b (javax.swing.JButton "Hello"))
#|kawa:2|# b
[ Hello ]
#|kawa:5|# (set! b:text "Goodbye")
;; Above button changes to [ Goodbye ]

There will be some more GUI goodies soon.

This is still a bit rough.  One bug I haven't tracked down
(help is welcome!) is that the Utilities->Purge Buffer action
leaves the JTextPane in an inconsistent state, as shown as
when you type the *2nd" character.

Some other refinements would be nice: The prompt (at least)
should be read-only.  There should be nice way to save the
type-script.  There should be an Edit menu for Cut/Copy/Paste,
at least.  Maybe a View many to change the font-size and
family.  Integration with pretty-printing, so that changing
the window width recalculates line-breaks.  Support
for display of XML/HTML DOM values.  Etc, etc.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]