This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Exported variables are null when required from applet, but ok otherwise
- From: alex mitchell <lexaay at gmail dot com>
- To: "kawa at sources dot redhat dot com" <kawa at sources dot redhat dot com>
- Date: Thu, 29 Apr 2010 12:38:48 +0800
- Subject: Exported variables are null when required from applet, but ok otherwise
I have a problem that a variable defined and module-exported from one file
is #!null when used in an applet, but is initialized correctly otherwise.
Here's an example:
-- test.scm --
(module-export a)
(define a 1)
-- applettest.scm --
(require "test.scm")
(define (init) :: void
(format #t "called init.~%~!"))
(define (start) <void>
(format #t "called start.~%~!")
(format #t "run: ~a~%~!" a))
(define (stop) :: void (format #t "called stop.~%~!"))
(define (destroy) :: void (format #t "called destroy.~%~!"))
-- applettest.html --
<html>
<head><title>Applettest</title></head>
<body>
<applet code="applettest.class" archive="applettest.jar, kawa.jar" width=400
height=300>
Sorry, Java is needed.
</applet>
</body>
</html>
-- output --
$ appletviewer applettest.html
called init.
called start.
run: #!null.
Whereas this works fine:
-- main.scm --
(require "test.scm")
(format #t "run: ~a.~%~!" a)
-- output --
$ kawa main.scm
run: 1.
Is there something special about compiling with the --applet flag that I'm
missing?
thanks,
Alex