This is the mail archive of the mailing list for the Kawa project. See the Kawa home page for more information.

[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: `object' and interfaces

Thanks. However, I am getting the following error when using that code
within a macro... I think the null pointer does not appear in my code,
but somewhere during the compilation. BTW, I hope there will be no
problems calling the method (itemStateChanged) from Java (this is
related to my previous post, in which I said I used fields instead of
methods because there was no means for calling methods from Scheme).


(defmacro test ()
  '(let ((listener (object (<java.lang.Object> <java.awt.event.ItemListener>)
                           ((itemStateChanged (arg <java.awt.event.ItemEvent>))
				              (display "listener called\n")))))

#<syntax test>
#|kawa:76|# (test)
        at gnu.expr.LambdaExp.addMethodFor(Compiled Code)
        at gnu.expr.Compilation.addClass(Compiled Code)
        at gnu.expr.Compilation.<init>(Compiled Code)
        at gnu.expr.LambdaExp.eval(Compiled Code)
        at gnu.expr.ModuleExp.evalModule(Compiled Code)
        at Code)
        at Code)
        at kawa.repl.main(Compiled Code)