Author Topic: Updating WZGUILib  (Read 155967 times)

0 Members and 2 Guests are viewing this topic.

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #180 on: August 26, 2012, 06:54:35 pm »
TI Bug report:
So I was testing some form stuff that involved the fullscreen paramater. I made a form that would be fullscreen and visible to the user when they opened the script, when on.construction is called. I closed that script and came back later and reopened it and got an error stating that function 3 of drawRect had to be >= 0, it was located in the form drawing code. I tried it on the calculator only to have the same outcome! I also noticed that on the student software if you just set the script again right after the error it worked just fine. So I changed the fullscreen paramater to false and then closed and reopened the script only to find out that platform.window.width and platform.window.height returns a 0 when initialy running it. Initialy bieng when you open it, not when you reset the script on the student software.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Updating WZGUILib
« Reply #181 on: August 27, 2012, 04:36:16 am »
Did you meant fullscreen as the glitch I've discovered and used in NyanCat ?
If so, it is not a bug to report to TI since it is not supported officially by TI.

If not, I'm afraid I do not have understood your story =(
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Updating WZGUILib
« Reply #182 on: August 27, 2012, 04:42:17 am »
Did you meant fullscreen as the glitch I've discovered and used in NyanCat ?

How do you do that? It seems interesting to me :)

[edit] This is a nice lib! Now to see what projects I can use it for.
« Last Edit: August 27, 2012, 06:07:09 am by ElementCoder »

Some people need a high five in the face... with a chair.
~EC

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Updating WZGUILib
« Reply #183 on: August 27, 2012, 05:12:21 am »
Did you meant fullscreen as the glitch I've discovered and used in NyanCat ?

How do you do that? It seems interesting to me :)

http://tiplanet.org/forum/viewtopic.php?f=19&t=7271&p=114379
in 3.1, the bug was active only the first frame of focus. So you were not able to redraw on it.

In 3.2, setFocus forces the glitch to appear when you want.
« Last Edit: August 27, 2012, 05:13:11 am by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Updating WZGUILib
« Reply #184 on: August 27, 2012, 06:17:00 am »
The 'bug' is also used in EEPro to add an icon to the tab thing:



Edit:
The issue you have with the height/width functions returning 0 in on.construction is normal. At that point the window isn't initialized yet (although it is when you reset the script).
The official doc mentions this IIRC. You should use the on.resize event handler to properly resize your stuff (on.resize will also get called at script startup, when the window is initialized).
« Last Edit: August 27, 2012, 07:09:54 am by Jim Bauwens »

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #185 on: August 27, 2012, 07:39:53 am »
IDK, I looked through the documentation, but maybe I missed something. Anyway good to know.

Also @ElementCoder, thanks. If you are looking to make games I am trying to add a foms graphics context. nvm, I will just make an overall graphics maganger.

@Levak, It dosent go fullscreen in that way. I thought about doing something like that, but then I realized that it wouldnt be OS <= 3.1 compatible.
« Last Edit: August 27, 2012, 10:57:38 am by jwalker »
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #186 on: August 28, 2012, 07:52:31 pm »
Here is the Beta that I am going to post onto TICalc in a few weeks. You may be wondering 'A few weeks? Why?'. The reason is because I am going to write some tutorials and release them with this beta.
**Notice: I added an on.resize function, so fullscreen works correctly again.

As always the TNS is for 3.2 and the Lua is for 3.1, although most code is compatible.

All strings currently in the TNS will draw DIFFRENTLY on a 3.1 handheld. Due to a TI Bug I had to change drawing code. All strings draw exactly one pixel off on the horizontle(y) part of the screen.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #187 on: September 03, 2012, 07:25:20 pm »
Here is the somewhat completed start page and the forms referance.
It is all in HTML.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #188 on: September 24, 2012, 08:19:41 pm »
Its been a while since I posted...
Anyway I finished the Dialog reference and I want to get buttons and textboxes done tonight, maybe even more than that
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #189 on: October 18, 2012, 02:21:28 pm »
Ok, so It has been super busy, but do to a teachers conference, I get a 4 day weekend. I should get all of the documentation done by sunday. Here is the latest version. Alot of the controls are done now.
« Last Edit: October 18, 2012, 02:21:50 pm by jwalker »
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #190 on: October 19, 2012, 08:20:38 pm »
I would like to introduce a newer feature of WZGUILib: Events.
Currently there are 11 events. How it works is everytime an event fires, it calls the handler, WZ_E_THROW().
The events are: WND_CLOSE, WND_MAX, WND_REG, WND_PNT, TXTBOX_TXTCHNG, NUD_NCHGNGP, NUD_NCHGNGM, RDB_MCHNG, CHK_CHKCHNG, PB_NPIC, PB_PPIC.
How you analize events is through the table WZ_EVENT_ST. The members are WND_NAME, E_TYPE, CON_THROWER.
CON_THROWER is the name of the control that threw the event, and WND_NAME is that controls parent.
Im still working on the concept, but it looks good so far.
This version will be released with WZGUILib, but it will be named WZGUILib EV. I will be putting this version up soon.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Updating WZGUILib
« Reply #191 on: October 20, 2012, 04:59:14 am »
Nice to see this is still progressing. I hope eventually there are more Nspire developers that uses this.

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #192 on: October 20, 2012, 08:44:08 pm »
Im still plugging away. Anyway here is the version of WZGUILib that I talked about. Currently I have most of the events bieng thrown at the end of the code, but a few are called right away. Currently if the event thrower isnt a control (because it is a form), the paramater of WZ_EVENT_ST named CON_THROWER is set to nil.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline jwalker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 660
  • Rating: +13/-0
  • Almost everything I have released includes a 'WZ'
    • View Profile
Re: Updating WZGUILib
« Reply #193 on: November 11, 2012, 11:50:34 am »
So I haven't had a whole lot of time to work on this, but I'm still going. I've hit a 4 day weekend, and with only 3 controls to document, that should be done finally today, if something doesn't get in the way :p. I also decided that since I'm writing my documentation in HTML, why not rewrite my table generator in JavaScript instead of Java? So I'm in the process of doing that. I also have a few other controls I need to make, and I haven't gotten anywhere with scrollbars, due to my lack of time. So that is one more of the things I will be working on. I also need to add the ability to add graphics, so that brings along its own set of challenges.
So I have a question, Is there a way to totally delete an object from memory, not just from the table that contains the object?
I wonder this because table.remove only removes the object from the table, yet it still exists in memory.
<a href="http://www.nerdtests.com/ft_cg.php?im">
<img src="http://www.nerdtests.com/images/ft/cg.php?val=9612" alt="My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!"> </a>

Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Updating WZGUILib
« Reply #194 on: November 11, 2012, 12:01:41 pm »
So I have a question, Is there a way to totally delete an object from memory, not just from the table that contains the object?
I wonder this because table.remove only removes the object from the table, yet it still exists in memory.
try a garbage collection ?

See http://lua-users.org/wiki/GarbageCollectionTutorial
and here on how to use it : http://www.lua.org/manual/5.1/manual.html#pdf-collectgarbage
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation