This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project. See the Kawa home page for more information.
Hi,
What happens if I call a Java method that returns an object of type
not convertible to a Scheme type? For example,
#|kawa:4|# (define gf (primitive-static-method <java.awt.Font> "getFont" <Font> (<String>)))
#|kawa:5|# gf
#<primitive procedure Font java.awt.Font.getFont(java.lang.String)>
#|kawa:6|# (gf "Helvetica")
#!null
#|kawa:7|# (define f (gf "Helvetica"))
#|kawa:8|# f
gnu.mapping.UnboundSymbol: Unbound symbol f
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at java.lang.RuntimeException.<init>(RuntimeException.java:47)
at gnu.mapping.UnboundSymbol.<init>(UnboundSymbol.java:10)
at gnu.expr.ReferenceExp.lookup(ReferenceExp.java:50)
at gnu.expr.ReferenceExp.eval(ReferenceExp.java:58)
at gnu.expr.ModuleExp.evalModule(Compiled Code)
at kawa.Shell.run(Compiled Code)
at kawa.Shell.run(Shell.java:77)
at kawa.repl.main(Compiled Code)
I would like to be able to keep the returned value in a Scheme
variable and pass it to a Java method later.
Thanks,
Aleks