Author Topic: Updating WZGUILib  (Read 140797 times)

0 Members and 2 Guests are viewing this topic.

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 #195 on: November 11, 2012, 12:07:57 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.

Normally, if all references to an object are removed, the object will be destroyed. Lua will do this automatically, but you can force it. (see links Adriweb gave).
I'd suggest you to check if you really removed all the objects first, because forcing a garbage collection isn't the normal thing to do.

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 #196 on: November 11, 2012, 12:08:22 pm »
I was wondering if that was what that was for, and I will have to test that out jim
« Last Edit: November 11, 2012, 01:51:08 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 #197 on: November 18, 2012, 04:11:54 pm »
Today I added a working graphics class, GraphDev.
Currently there are 3 parameters: parent; bgColor; screenInf
screenInf has two different inputs, "fs" which stands for Full Screen and a table of points.
fs will set it to use the full body of a form.
The table of points looks like this: {x, y, width, height}.
Right now I'm not sure if I want to keep the last argument or not, as I think the graphics control should take up the full screen.
how you add objects is a little different also...
To add an object the format is: GraphDev_Name:add(object).

Important information: In fs mode, it will erase any controls beneath GraphDev control.
<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 #198 on: November 19, 2012, 09:08:18 am »
Yesterday, I finaly got unicode to work properly with textboxes.
I also ran into an issue...
What happens is, any control (such as the tabcontrol), cannot be clipped because even though I reset the clipping rectangle to the size of the body of the form, when I resize it the children of the control that is clipped can show up outside of the form!
Its kind of hard to explain so I will upload pics when I get home.
<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 #199 on: November 19, 2012, 11:24:53 pm »
In the first image, it shows a blue square, that is 15 width and 15 height.
The second image shows the same blue square, transposed so that most of the square is clipped.
The last image shows that sub-objects wont be cropped when out of the forms borders, like they are supposed to be. This is also the case for other controls that contain controls.
<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 ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Updating WZGUILib
« Reply #200 on: November 20, 2012, 02:09:55 am »
I hope it will be an easy fix. This project is becoming quite big now :o isn't it? I wish I could find some time to mess around with it and create something.

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

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 #201 on: November 20, 2012, 09:03:54 am »
I hope so too. It is, so I think I'm going to have to make versions in order to keep it from getting too large, also I am working on tutorials to hopefully shorten the learning curve.
<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 #202 on: November 22, 2012, 04:12:28 pm »
I still am working on getting it to clip right without having to resort to if statements in order to get it to clip right, is there a way to clip two things at once?
<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 #203 on: December 08, 2012, 03:20:26 pm »
Here is a first look at the GraphDev control. I only have paint events routed to it right now, but it will be really simple to add the other ones in. I didnt fix the other issue I talked about earlier in my posts, but I will be implementing an if-then approach.
<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 flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Updating WZGUILib
« Reply #204 on: December 08, 2012, 04:44:46 pm »
Are you still planning on porting this to prizm?



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

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 #205 on: December 08, 2012, 05:09:10 pm »
I am, but it will definately be some time because I barely have enough time to work on the Nspire version. I plan on starting the prizm port right after I release WZGUILib 3.0 (this release), but I have to add a few features before I do release it. WZGUILib Prizm 1.0 will actualy be just a port of WZGUILib 3.0, and the versions will be numbered from there.
« Last Edit: December 08, 2012, 05:09:29 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 #206 on: December 09, 2012, 03:02:07 pm »
Today I routed most of the events to the control, I revised some old window related code that was oblolete with new functions I had added recently. I also added some new events like the timer and escapeKey.

*setup
Code: [Select]
--GraphDev setup
                      --form, bgcolor, fullscreen, function table
gd = GraphDev(fgd, color.white, "fs", {paint=WZ_Paint, click=cl, mouseMove=mm, enterKey=ek, timer=nil, arrowKey=ak, charIn=ci, escapeKey=esk}
I coppied and pasted this from the document that I uploaded below.

*how it works
Basicly every event that gets passed to this control is handled by the programmer instead of WZ.
<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 #207 on: December 12, 2012, 07:40:12 pm »
So it has been a few days, and this morning on the bus the light bulb went off and I now know how I will get scroll bars to work.
I also have been contemplating a few other things....
First, after I release WZGUILib 3.0, I want to start screwing around with coroutines, in order to (possibly) add multithreading to WZ.
Last, I have been running an idea through my head every once in a while. I have been thinking that perhaps I should make WZ into a "Desktop environment". Here is some of the reasons:
1. ability to minimize windows, have multiple windows "full screen" at once. This is could be possible now, because I implemented backtab to switch between windows.
2. It might take a while, but I would develop an app system. How it would work is every "app" would be in a document stored in the library, the user then would install it by opening a dialog that asks for the path of the document. The apps would be able to have icons and other data that then would be displayed to the user. It would be persistant and would have to be uninstalled when they want to remove the program.
3. It would be more stable because less would be left up to the end programmer. A lot of WZ now is left up to the programmer, so they have to check themselves to make sure it is running properly and everything so the user has a nice experience, a desktop environment needs to run even if one app crashes. Again as with #1 I could implement this, the reason I haven't implemented a strict error recovery system is because I want to make WZ as small as possible. I may release a "WZGUILib Secure" edition in the future that would have very good error recovery systems.

Reasons Why I may be against such a Ludacris thing:
1. Less flexible. Right now it is very flexible and the programmer has lots of choice.
2. A "Desktop" environment would be a lot larger.
3. An app system using the current loading scheme would be heavy, this is why the style system wont be in the standard WZ, but in a separate release instead.

Tell me what you think, I would like to know.
<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 ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Updating WZGUILib
« Reply #208 on: December 13, 2012, 03:29:08 pm »
I think it would be very nice but ,like you said, I think it would take a (large) nom out of flexibility. The apps sound nice, but wouldn't that make the document really huge?
I really need to find some time to play with this. Every time I see an update I'm like wow this looks great. But then I realise I have work to do, homework and suddenly all time is gone :( But there's a 2 week christmas holiday coming up so I hope I can do something in that time :D

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

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 #209 on: December 13, 2012, 09:58:30 pm »
It wouldn't make the document size any bigger, it would use more memory because we have to use loadstring. I plan to do a lot of programming during Christmas vacation, especially on the days I don't work. I have to get a few more controls documented, then I will upload the documentation and the newest dev release(s).
<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