Author Topic: toolpalette => ??  (Read 6295 times)

0 Members and 1 Guest are viewing this topic.

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
toolpalette => ??
« 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"
Code: [Select]
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. :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: toolpalette => ??
« Reply #1 on: August 24, 2011, 01:05:40 pm »
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 ;)

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: toolpalette => ??
« Reply #2 on: August 24, 2011, 04:08:42 pm »
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. :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: toolpalette => ??
« Reply #3 on: August 24, 2011, 04:13:56 pm »
We might want to clear that up just as a remainder, in the Inpsired-Lua wiki about that one....
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Loulou 54

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 165
  • Rating: +39/-0
    • View Profile
    • Mes programmes sur TI bank.
Re: toolpalette => ??
« Reply #4 on: August 24, 2011, 04:25:47 pm »
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.. :)
Some of my program available here.. :)
http://ti.bank.free.fr/index.php?mod=archives&ac=voir2&id=1471

     

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: toolpalette => ??
« Reply #5 on: August 25, 2011, 07:54:39 am »
And the software creates a specific panel of your toolpalette inside the sidebar with all the other software functions :)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: toolpalette => ??
« Reply #6 on: August 25, 2011, 08:48:06 am »
I'll try to edit the toolpalette page later today (and I will try to edit other stuff).

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: toolpalette => ??
« Reply #7 on: August 25, 2011, 01:01:05 pm »
cool thanks ;)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation