lua-users home
lua-l archive

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


Hi, Two newbie Qs on LuaCom 1.3:

1. Can you pass the LuaPlus unicode wstring type to and from COM apps? Reading the LuaCom docs it seems to me that unicode strings always get downgraded to ANSI, though I haven't tried any strings where it would matter just yet.

2. How do you synchronously leave an event loop running and get all the events to be either processed in some handler function or called by name in a table? In Perl's Win32::OLE I can do:

Win32::OLE->WithEvents($app, $handler);

And I get the $app and methodname as arguments, I think.

Then later, I just say:

Win32::OLE->MessageLoop;

I found a thread that vaguely hints at a StartMessageLoop function in LuaCom, but I did not see it documented and did not fully understand from the description how to use it. So anye samples of how, say, a stand-alone console app can receive events, would be cool. My test app in Perl can do that, happily printing the names of event methods it gets called with, though I reckon it has to use a separate invisible window for the message loop anyway.

--
With kind regards Veli-Pekka Tätilä
Accessibility, Apps and Coding plus Synths and Music:
http://vtatila.kapsi.fi