This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
an applet as a module
- To: kawa at sources dot redhat dot com
- Subject: an applet as a module
- From: Toni Wuersch <arw at echonyc dot com>
- Date: Tue, 17 Jul 2001 11:17:53 -0400
The --applet flag doesn't work in kawa 1.6.94.
But modules work. A silly Hello World applet follows:
;; A test applet for Kawa-Scheme
(module-name 'testapp)
(module-extends <java.applet.Applet>)
(define (paint (g :: <java.awt.Graphics>)) <void>
(invoke g 'drawString (as <java.lang.String> "Hello, World") (as
<int> 50) (as <int> 50)))
(define (init) <void> (format #t "called init.~%~!"))
(define (start) <void> (format #t "called start.~%~!"))
(define (stop) <void> (format #t "called stop.~%~!"))
(define (destroy) <void> (format #t "called destroy.~%~!"))
Set up the above as "testapp.scm", compile it, create a "testapp.htm" file
analogous to the "scribble.htm" file described in the Kawa manual, and it
should work.
Toni
<arw@echonyc.com>