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]

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.


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