diff options
author | scuri <scuri> | 2010-07-22 22:47:48 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-07-22 22:47:48 +0000 |
commit | c8e3c97357e0e3b551ef52e549717ba4efaffb8b (patch) | |
tree | 28a45023aa7afcc94db3ef5b8404194f7bf49c46 /html/examples/view.wlua | |
parent | 34f4dcea9afc19dcaf929b0ef4170a6b6940ab42 (diff) |
*** empty log message ***
Diffstat (limited to 'html/examples/view.wlua')
-rw-r--r-- | html/examples/view.wlua | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/html/examples/view.wlua b/html/examples/view.wlua index 60be33e..65eaac7 100644 --- a/html/examples/view.wlua +++ b/html/examples/view.wlua @@ -4,7 +4,7 @@ require"cdluaim" require"iuplua" require"iupluacd" -function PrintError(func, error) +function PrintError(func, err) local msg = {} msg[im.ERR_OPEN] = "Error Opening File." msg[im.ERR_MEM] = "Insuficient memory." @@ -13,8 +13,8 @@ function PrintError(func, error) msg[im.ERR_FORMAT] = "Invalid Format." msg[im.ERR_COMPRESS] = "Invalid or unsupported compression." - if msg[error] then - print(func..": "..msg[error]) + if msg[err] then + print(func..": "..msg[err]) else print("Unknown Error.") end @@ -22,17 +22,17 @@ end function LoadImage(file_name) local image - local ifile, error = im.FileOpen(file_name) + local ifile, err = im.FileOpen(file_name) if not ifile then - PrintError("open", error) + PrintError("open", err) return end -- load the first image in the file. -- force the image to be converted to a bitmap - image, error = ifile:LoadBitmap() + image, err = ifile:LoadBitmap() if not image then - PrintError("load", error) + PrintError("load", err) return end @@ -86,10 +86,10 @@ function ShowImage(file_name) function cnv:button_cb() local file_name = "*.*" - local error + local err - file_name, error = iup.GetFile(file_name) - if error ~= 0 then + file_name, err = iup.GetFile(file_name) + if err ~= 0 then return iup.DEFAULT end @@ -146,12 +146,12 @@ end function main(arg) local file_name = "*.*" - local error + local err -- Try to get a file name from the command line. if (arg == nil or table.getn(arg) < 2) then - file_name, error = iup.GetFile(file_name) - if error ~= 0 then + file_name, err = iup.GetFile(file_name) + if err ~= 0 then return true end else @@ -165,8 +165,8 @@ function main(arg) while Try do file_name = "*.*" - file_name, error = iup.GetFile(file_name) - if error ~= 0 then + file_name, err = iup.GetFile(file_name) + if err ~= 0 then return true end |