lua-users home
lua-l archive

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


Hi Andreas,

On Sat, Nov 30, 2002 at 05:27:35PM +0100, Andreas Rozek wrote:
> Hmmm, in that case one should withdraw any LuaJava examples
> dealing with AWT event handlers as they lead to the impres-
> sion, that one could script graphical user interfaces - and
> this seems to be wrong  (AWT and Swing rely on multi-threa-
> ding)

I rather prefer a big fat warning over withdrawing these examples
altogether. I found the Lua console from the AWT example supremely
useful for scriptiong OOo.

> >You *can*, however, use multiple Java threads, as long as you take
> >care that LuaJava has interactions with only a single thread, which
> >always must be the same one.
> 
> Hmmm, this might be a condition  which I can't meet - but I
> have to think over it.  Nevertheless,  the lack of  thread-
> safety is a very severe restriction of LuaJava...

Agreed. Perhaps, as a workaround, you could use an approach similar to
the one that Swing uses with the invokeLater() method and related
ones.

- Christian