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]

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



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