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]

Re: Nested Classes?


Croteau, Beau wrote:
How would one go about doing something like this:

(define-simple-class <test1> ()
  (name type: <java.lang.String>))

(define-simple-class <test2> ()
  (test1Element type: <test1>))

(That's not really a nested class, btw.)


An instance of <test1> can be instantiated no problem, but when I
attempt to make a <test2>, I get the following stack trace:

You need to be more specific about the file takes attempts to make test2, and how you're using the files.

As a general rule, I recommend against using Eval.  Kawa is
compiler-based, and the name-lookup and class-loader behavior
get a little fragile when using Eval.

A nested Shell.run called indirectly from Eval.eval
raises a red flag with me - it suggests you're doing something
weird.

(A better-documented and specified API for how to invoke
Kawa from Java is one of my top priorities.)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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