Omnimaga
Calculator Community => TI Calculators => Lua => Topic started by: Loulou 54 on August 24, 2011, 12:41:29 pm
-
How to use toolpalette's functions ??
I've tried this and it doesn't work.. I have the error "expected function in menu item 1 of tool box 1"
menu = {
{"Mode", -- Tool box "Mode"
{"Decimal", setDec}, -- Menu item "Decimal" calls function setDec()
{"Hexadecimal", setHex},
{"Octal", setOct},
{"Binary", setBin}
}
}
toolpalette.register(menu)
function setDec()
end
function setHex()
end
function setOct()
end
function setBin()
end
Thank you. :)
-
Try putting the functions (setDec, setOct) before the table. Now when you define the table they are nil, so the value is nil instead of a function ;)
-
OMG you're right..
I've already tried that before but I may have forgotten something.. I don't know. ^^'
Well it's ok now. Thank you Jim. :)
-
We might want to clear that up just as a remainder, in the Inpsired-Lua wiki about that one....
-
And it would be fine to say that it is activated by pressing menu key ! I thought at the begining it was a PopUp menu that you can launch with a function.. :)
-
And the software creates a specific panel of your toolpalette inside the sidebar with all the other software functions :)
-
I'll try to edit the toolpalette page later today (and I will try to edit other stuff).
-
cool thanks ;)