lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

I have a Java Swing application in which I would like to embed Lua Java.
But instead of loading Lua scripts from files, I'd like to have an
interactive Lua shell in my application.

It all works quite ok but I have two problems:

1) print() doesn't work. I can call print() but I don't get any output.
I guess that's because I'm in a Swing application, but I don't see why
it shouldn't work. (I've worked around this by providing my own
JavaFunction.)

2) I want to print the result of each entered line, just as the
interactive mode of lua50.exe, and just as Console in Lua Java works,
but I don't know how to do that. I've looked at the Console
implementation and can't see anything special, is it just due to my
print() not working? Is there a way to get the last value of a
L.LloadBuffer(), L.pcall() cycle?

Thanks in advance,
 Jonas