This is the mail archive of the kawa@sources.redhat.com 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]

Problem with define-alias


A problem with define-alias. Consider the file below, t.scm:
  (module-name 't)

  (module-static #t)

  (define-alias <jvector> <java.util.Vector>)

  (write <jvector>)
  (newline)

  (write (make <jvector>))
  (newline)

  (define (make-jvector) <jvector>
    (make <jvector>) 
  )

When I load it into Kawa, the top-level uses of <jvector>
are recognised, as shown by the two lines of output after
prompt 2. But the use of <jvector> inside make-jvector isn't:
  #|kawa:1|# (scheme-implementation-version)
  1.6.70

  #|kawa:2|# (load "t.scm")
  ClassType java.util.Vector

  []

  #|kawa:3|# (make-jvector)
  ; Now Kawa won't respond any more.
Incidentally, the same error occurs if I omit the <jvector>
result specifier from the function.

On the DOS window from which I started Kawa, an error trace
appears, and the Kawa GUI window then hangs, refusing
to deal with further input:
  [d:\kb7\mm3\general]java kawa.repl -w
  t.scm:13:2: warning - no method `<init>' in jvector <--- appeared when I loaded t.scm.
  java.lang.NoClassDefFoundError: jvector
        at atInteractiveLevel.makeJvector(Unknown Source)
        at atInteractiveLevel.apply0(Compiled Code)
        at atInteractiveLevel.apply0(Compiled Code)
        at gnu.expr.ModuleBody.applyN(ModuleBody.java:93)
        at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:61)
        at gnu.expr.ApplyExp.eval(Compiled Code)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:38)
        at kawa.Shell.run(Compiled Code)
        at kawa.Shell.run(Shell.java:35)
        at kawa.repl.apply0(repl.java:27)
        at gnu.mapping.Future.run(Future.java:59)

Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091 




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