Reply To: Popup Menu Experiment

Home Forums General Programming Popup Menu Experiment Reply To: Popup Menu Experiment

#13478
atom
Keymaster
    • Topics: 159
    • Replies: 2945
    • Total: 3104
    • ★★★★★

    YOu can as i showed, your methods return numbers, and any method in Lua can take numbers (or any other type) as a parameter so:

    ret1 = function()
       return 1
    end
    
    ret1 = function(param1)
       console (param1)  -- will print the contents of the param1
       console (ret1())  -- will print whatever ret1 method returns 
    end
    

    A few links for Lua functions tutorial:
    http://lua-users.org/wiki/FunctionsTutorial
    http://www.lua.org/pil/5.html

    Ctrlr