lua-users home
lua-l archive

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

Thank you for the response...

> You did not mention what type of Windows application
> you're working on, but
> I've noticed similar problems when incorporating Lua
> 4.0.x into GUI
> applications.
> Console applications should work just fine, since
> print-s just end up on
> stdout and any errors Lua spits out go to stderr.
> The situation seems to be
> different with GUI apps, though.

I'm using console applications or at worst, the
generic Windows application. In both cases, it doesn't
work. Print crashes my program, usually right at the
print statement (The message never makes it to the
console or stderr.txt file.)

> The solution I found is similar to the one you
> already described: just make
> sure you register your own print replacement (for
> debugging &c.) and[!] a
> function to handle _ALERT. The latter is the
> function that gets called
> whenever Lua (v4) outputs any errors. I found that
> redefining these 2
> functions prevented my Lua GUI host app from taking
> unexpected nose dives.

I'm still using Lua 4 too. Can you tell me more about
_ALERT? I don't know about it, and I don't remember
seeing it in any of the Lua documentation I have.


Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.