Skip to content

spawning PopupInput Dialogue #22

Answered by hossimo
lukas-runge asked this question in Q&A
Discussion options

You must be logged in to vote

The issue is because the second argument of PopupInput() is looking for a display_handle.

In the system monitor you should notice an error like this:

It's not 1000% clear but what it is saying is the second argument is the wrong type. it's looking for a LUA lightuserdata object but instead it got something else, display_handle, which in this context is likely nil. In a proper LUA file you will notice that the main function of your program has a display_handle argument:

local function Main(display_handle,argument)
    local r = PopupInput("TITLE", display_handle, {{"str", "String", nil}, {"int","Number", 123}}, "123", 100, 200)
end

In this case display_handle passed in via the system to t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lukas-runge
Comment options

lukas-runge Dec 17, 2020
Collaborator Author

Answer selected by lukas-runge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants