π
<-
Chat plein-écran
[^]

ETK LUA Help

Pour TI-Nspire OS 3.0 ou ultérieur.

ETK LUA Help

Message non lude j_love » 19 Juin 2019, 11:14

Hello everyone,

I am new to this forum. Thanks for creating this nice forum and all the stuff here.

I do have a problem creating lua scripts with the ETK Framework.

I am using the Student Software to simulate the scripts.
Can someone just tell me on howto implement the ETK Framework.
Basically I just want to test the following:

Code: Tout sélectionner
do
    local Input  = etk.Widgets.Input
    local Label  = etk.Widgets.Label
    local Button = etk.Widgets.Button

    local myView = etk.View()


    local btn1,inp2
    local btn1 = Button{}
    local inp2 = Input{}
    btn1.position = Position { top='31px',left='235px'  }
    inp2.position = Position { top='31px',left='22px'  }

    myView:addChildren(btn1,inp2)

    etk.RootScreen:pushScreen(myView)
end


When copy pasting this I do get the following error:
2: attempt to index global 'etk' (a nil value)

I also tried copying the etk and extras folder to the Documents/CX folder in Windows. Tried also to transfer the ETK files to my handheld but this does not work.
So how can I just start coding with ETK framework?

Thank you everyone.

Best Wishes
j_love
Avatar de l’utilisateur
j_love
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Prochain niv.: 0%
 
Messages: 2
Inscription: 19 Juin 2019, 11:01
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: ETK LUA Help

Message non lude Adriweb » 19 Juin 2019, 12:00

Hello,

I assume you're talking about the ETK version from here: https://github.com/TI-Planet/ETK

In which case, it has a build system and extended syntax that you "have to" use, in order for it to do all the heavy lifting of requiring/including the lib's files.

The end result would be the concatenation (among other things) of the files together. You can look at the demo.tns file that's the built version.

(Note: for the previous version of ETK, which some utilities use, look at formulapro for instance: https://github.com/adriweb/EEPro-for-Ns ... llcode.lua and its repo)

To "convert" from Lua to TNS, you can use Luna (recommanded) or the nspire computer software
Image

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
Avatar de l’utilisateur
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Prochain niv.: 80.2%
 
Messages: 14613
Images: 1218
Inscription: 01 Juin 2007, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Twitter/X: adriweb
GitHub: adriweb

Re: ETK LUA Help

Message non lude j_love » 19 Juin 2019, 13:53

Hi Adriweb,

thanks four your help.
I was not aware that I have to execute the build.lua script. After doing that it worked.
The build.lua script copies all the imports to a big.*.lua file which then can be copied into the script manager in the student software.

Thank you!
Avatar de l’utilisateur
j_love
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Prochain niv.: 0%
 
Messages: 2
Inscription: 19 Juin 2019, 11:01
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile


Retourner vers Nspire-Lua

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 6 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1043 utilisateurs:
>1000 invités
>38 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)