Re: /IUP/ Help needed with examples

new topic     » goto parent     » topic index » view thread      » older message » newer message

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?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu