Re: /IUP/ Help needed with examples
- Posted by dr_can Jan 07, 2016
- 2148 views
I am working through the Iup examples and also "A Basic Guide to using IupLua" (see http://www.luteus.biz/Download/LoriotPro_Doc/LUA/LUA_For_Windows/iup/iup.html)
I am trying a version of the Alert example:
-- Example 2 -- Alarm include gui/iup/iup.e constant reply = {"File saved sucessfully - leaving program", "File not saved - leaving program anyway", "Operation cancelled"} procedure main( sequence cmd = command_line() ) IupOpen( 0, {} ) integer b = IupAlarm("IupAlarm Example", "File not saved! Save it now?" ,"Yes" ,"No" ,"Cancel") -- Shows a message for each selected button printf(1, "The response is: %s", {reply[b]}) if getc(0) then end if IupMessage("Save File", reply[b]) IupClose() end procedure main()
Lines 14 & 15 are added to prove that b is correctly returned; why doesn't the IupMessage get invoked?