|
I have been working with Simon's application and am having a problem and wondered if there is a solution which I could ask Simon to implementWhen I use this coderequire 'iuplua'
iup.GetText('Send me a message','Hello')
thisdoesnotexist()
if iup.Close then iup.Close() endIt fails on line 3. This means the iup.Close() is not called and the next time I run the script the program crashes out and closes completely.As you can see at the point the script fails no dialogue is open, using any iup dialogue of any sort and not getting to the iup.Close command has the same affect, but this is the simplest one.On Thu, 28 Mar 2019 at 13:38, Antonio Scuri <antonio.scuri@gmail.com> wrote:Hi Simon,I don't have a solution but a few comments.I wouldn't call iuplua_close for every script, if this is what you are doing. Using require is the recommended option. But notice that does not call IupClose anywhere.I don't see why an error in Lua code would close an IUP dialog. If this happen before could be an error in older IupLua error management. The current IupLua error dialog allow 3 actions: Copy the error report to the clipboard, Continue with the execution (the Lua script will abort but will not close any dialogs), and Exit the application. You can replace this dialog with your own version that can close your dialogs.Best,ScuriEm qua, 27 de mar de 2019 às 17:39, Simon Orde <SimonOrde@family-historian.co.uk> escreveu:Hi – My Visual C++ app uses Lua to run scripts. Following various upgrades, I now have a problem with scripts that use IUP. If an error occurs in an IUP script, what usually happens is that instead of displaying a sensible error message, it shuts down my application somehow. This is a new problem that has only started happening since I upgraded my application from Visual Studio 2010 to 2017. When I upgraded my compiler, I also upgraded from Lua 5.1 to Lua 5.3.5 and from IUP 3.9 to IUP 3.26. That required a number of changes to get everything working. I’ve manged to overcome most issues, but this one is still unresolved.
--