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]

Re: Problems compiling a module


Eric Gustafson wrote:

>I get the following exception when I try and compile
>the test.scm file.
>
>kawa -C test.scm
>(compiling test.scm)
><unknown>:0: Literals: Internal error:java.lang.Error: gnu.expr.PrimProcedure does not implement Externalizable
>java.lang.Error: gnu.expr.PrimProcedure does not implement Externalizable
>
It would probably be easy enough to have gnu.expr.PrimProcedure implement
java.io.Externalizable, I guess.

>(define add-to-tabbed-pane  
>  (primitive-virtual-method 
>   <javax.swing.JTabbedPane> 
>   "add"  
>   <java.awt.Component>  
>   ( <java.lang.String> <java.awt.Component> )))
>
However, I recommend:

(define (add-to-tabbed-pane (pane :: <javax.swing.JTabbedPane)
    (str :: <java.lang.String>)
    (comp :: <java.awt.Component>))
  (invoke pane 'add str comp))

This will usually be more efficient in any case, because it does not use
reflection at run-time.



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