Cancel in "user_input"

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
dmaon
Posts: 14
Joined: Wed Nov 29, 2006 2:17 pm

Cancel in "user_input"

Post by dmaon »

How do I check in a mcro if the user pressed Cancel in a dialog created by "user_input"?
By the way - did you succeed to recreate the bug were the program returned a wrong left marked column - as I described in response to you?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

How do I check in a mcro if the user pressed Cancel in a dialog created by "user_input"?

Code: Select all

function key_macro()
    -- the initial value
    local nill = ""

    -- ask for a user supplied decimal number
    local value = user_input("Some Value:", nill)

    if string.len(value) > 0 then
      message("User value was '" .. value .. "'.")
    else
      message("Operation cancelled by user!")
    end
end

key_macro() -- run the macro
By the way - did you succeed to recreate the bug were the program returned a wrong left marked column - as I described in response to you?

Unfortunately I could not replicate the bug at this end :(

Cheers Jussi
Post Reply