lua-users home
lua-l archive

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

Gunnar Zötl wrote:
> on the subject of IupLua, I am also playing around with it, and like
> it very much so far. There is one thing that strikes me as odd, though:
> if there is a runtime error in the IupLua script, the interpreter
> exits silently. This is on Windows. I tried to encapsulate my main

IupLua5 is still beta, it is not handling errors correctly. IupLua4
shows a small dialog with the callstack and everything.

> while dialog.visible do
>       something
> end

You are looking for a message loop. You should call IupMainLoop().
This will run until all dialogs are closed (or until you return 
IUP_CLOSE in any callback).

If you would like a modal dialog, just run IupPoup instead of IupShow
(IupPoup will run a message loop for you and will only return when
the dialog shown is closed) - this will give you the same result as
while dialog.visible, but will not consume as much CPU.

|\/|ark Stroetzel Glasberg

System Analyst
Tel:  55 21 2512-5984 ext. 116
Fax:  55 21 2259-2232