This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
problem requiring variables in applet
- From: teong leong chuah <teongleong at gmail dot com>
- To: kawa at sourceware dot org
- Cc: alex mitchell <alexm at nus dot edu dot sg>
- Date: Mon, 27 Dec 2010 15:50:50 +0800
- Subject: problem requiring variables in applet
Hi
I found a buggy behavior when compiling using the --applet flag
I'm working in linux kubuntu 10.10
== require-var.scm ===
(module-export required-var required-proc)
(define required-var 'some-var)
(define (required-proc) #t)
=== applet-test.scm ===
(require "require-var.scm")
(define local-var 'var1)
(define (init) :: <void>
(display "init")(newline))
(define (start) :: <void> ;; was (start) <void>
(display "start")(newline)
(display "local var ")(display local-var)(newline)
(display "required var ")(display required-var)(newline)
(display "required proc ")(display required-proc)(newline)
)
(define (stop) :: <void> (format #t "called stop.~%~!"))
(define (destroy) :: <void> (format #t "called destroy.~%~!"))
== my compile script ===
java -cp $CLASSPATH:/usr/local/share/java/kawa.jar:. kawa.repl -d
build --warn-invoke-unknown-method --warn-undefined-variable --applet
-C applet-test.scm
jar -cf applet.jar ./
#test
google-chrome lib/export/gameschemeapplet.html
the applet runs but when i have to access require-var which is a
variable required from another file (require-var.scm) it gives a null
pointer
accessing require-proc which is a procedure i required from the same
file however works fine.
local variable also works properly.
the problem doesn't occur when compiling to to --main.
i'm using the newest kawa grabbed and compiled last week.