Author Topic: basic split screen on lua [calculation sheet ]  (Read 3843 times)

0 Members and 2 Guests are viewing this topic.

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
basic split screen on lua [calculation sheet ]
« on: August 21, 2011, 05:11:56 pm »
I know that there is a sample from TI, that shows that it's possible.
But I couldn't really understand that file riemann.lua

Does anyone know how I can I do it, or know a better example for understanding.this?

I just need a calculation sheet, so the user can input a function e.g. define f2(abobora)=1/abobora!

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: basic split screen on lua [calculation sheet ]
« Reply #1 on: August 21, 2011, 07:28:35 pm »
You never used the split screen function before Lua ?

You can do so with Doc> 5  2 when you have a document open.
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: basic split screen on lua [calculation sheet ]
« Reply #2 on: August 21, 2011, 08:00:16 pm »
Yes I have used it, and I just figured it out, after pasting some lua code

I was looking for a way to split the screen using lua code, and I read that code at least 12 times,
looking where it was done  :-[

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: basic split screen on lua [calculation sheet ]
« Reply #3 on: August 22, 2011, 01:46:59 am »
I don't think it is done in the Lua code proper, but in the XML wrapper of the TNS document (which is then compressed with the proprietary & patented XML compression, ZLIB-compressed and encrypted).
IIRC, Levak made a TNS Lua generator that can output documents in split screen mode.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: basic split screen on lua [calculation sheet ]
« Reply #4 on: August 22, 2011, 06:24:40 am »
I was looking for a way to split the screen using lua code, and I read that code at least 12 times,
looking where it was done  :-[

No, there is no way you can split the screen in pure-lua. a lua script is embedded in a "widget", and when you split the screen, it just creates a place for another widget, where everything (including another lua script) can go.
So, splitting the screen has nothing to do with the lua code itself.

If you're looking to know how some variables are shared between these widgets, take a look at the 'var' APIs

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: basic split screen on lua [calculation sheet ]
« Reply #5 on: August 22, 2011, 12:38:36 pm »
Thanks, just one more question:

How can I handle the attempting to compare number with nil in:

Code: [Select]
teste=math.eval("lim(equ(n),n,8,1)")
if teste>0 then
(...)
[code]
[/code]

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: basic split screen on lua [calculation sheet ]
« Reply #6 on: August 22, 2011, 12:42:33 pm »
just do :

Code: [Select]
if teste then
....
end
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation