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: Embedding a REPL in a Java application


On 11/15/2009 07:47 AM, Jamison Hope wrote:
It sounds like for this to work, I would need to create and hold onto a
special initial ReplDocument (with shared=false) and then all subsequent
ReplDocument instances I would create from it with the proposed copy
constructor.

It seems like it shoudl work for your application to create and hold on to:

Language language = Language.getDefaultLanguage();
// or whatever.
Environment environment = Environment.getCurrent();

Then when you create a new ReplDocument you do:

new ReplDocument(language, environment, true)

I.e. always set shared.
--
	--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]