Calculator Community > Lua

Lua and 3.2

<< < (2/2)

Levak:
Important notice : on.construction() hasn't the same goal as on.create().

Indeed, on.construction() is executed just after the de-serialization of the XML contrary to on.create where platform, math, table etc .. lib were loaded.
I made all my best in order to have on.create back in 3.2 but TI didn't wanted to listen to the problems I showed.
I explained that on.construction has no more interest but didn't replied ...

Adriweb:
Hmm, I thought there would be some loaded libs already when on.construction gets fired, but if it's not the case, then I don't really see the point of having that event since init stuff can be put outside of any functions at the end of the programs for example and it would behave the same way ... ?

TIfanx1999:
Nice list Jim. I'm not much of an Nspire guy, but I can appreciate your dedication. =)

Jim Bauwens:
Levak, the platform, math, etc libs do get loaded before on.construction runs. However, the display window isn't initialized yet, so platform.window:height() and platform.window:height() return 0.
It would be a good idea to put this code in on.resize.
on.construction is still good for var, document, math, local and other stuff.

Art_of_camelot: Thank you :)
Also, maybe this topic could be pinned ? I think it's pretty useful for people :)

Edit: yay, it is pinned !

Navigation

[0] Message Index

[*] Previous page

Go to full version