Author Topic: Updating WZGUILib  (Read 154833 times)

0 Members and 2 Guests are viewing this topic.

Offline blauemauritius

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +0/-0
    • View Profile
Re: Updating WZGUILib
« Reply #330 on: August 04, 2013, 03:24:18 pm »
thank you...

i don't know how can i use the jar-file in LUA for NSPIRE? I have inserted the jar-file in a java project, but i see only class files.

Is it possible to get the lua script?

Thank you in advance.
« Last Edit: August 04, 2013, 03:35:15 pm by blauemauritius »

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 #331 on: August 04, 2013, 04:51:12 pm »
The jar file is basically like an exe, except for java. On Windows you should be able to double click the .jar file and it will run. You can also use the java command from a command line.

Also here is the newest toolset and the most recent version (as in the one I am working on right now) of WZGUILIB.

Some changes:
Fixed a tabcontrol bug, fixed a bug in the Clicks function.
Changed what happens when you hit the titlebar of an unfocused form. Instead of it becoming focused and movable, it is now just focused and you have to click it again to make it moveable.
Added the page control. Similar to windows, and in fact inherits from window. It is basically like a window in the way it contains controls, but it is immobile and only one page can be displayed at a time.
I modified the way tabcontrols are drawn.

WZ should be a lot more stable too as I added lots of check code.

I added an error handler, and if you have a wzCons window it will print the error message to it.
I added code to the wzCons so that if the message is too large to fit into the window, it sets it to a new line.

I would expect another upload by tonight as I have a lot of development time.
<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 blauemauritius

  • LV2 Member (Next: 40)
  • **
  • Posts: 25
  • Rating: +0/-0
    • View Profile
Re: Updating WZGUILib
« Reply #332 on: August 04, 2013, 04:58:22 pm »
Thank you.

Double click doesn't work on my system. I don't know why.

With the java command from command line i got an error. I used cmd. I changed in the folder where i saved the jar file. And i tried "java -jar <file> . I think this should be fine or?

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 #333 on: August 04, 2013, 05:26:26 pm »
This worked for me: java -jar "WZ_TAB_TOOL.jar"
You have to have quotation marks.
<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 #334 on: August 04, 2013, 08:15:23 pm »
yep, both worked for me, be sure to have the latest JVM installed.
( http://www.java.com/fr/download/ )
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

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 #335 on: August 04, 2013, 09:53:59 pm »
So, like I said here is another upload.
There is one major change. I used a modified version of the event distributer from inspired-lua and replaced all of the on events. Also, if you ever look back a couple of pages on this topic, you will notice an attached file that is called WZGUILIB_EV. The purpose of that file was to be able to take a WZ event, such as a window closing, and be able to run your own code in a callback function. This implements something similar, just with out all of the coding overhead. It is very simple,
form_or_dialog_name:bindEvent(string event, function callback). There is a catch though; at the end of your function before you return you must call the original handler code. This is possible because the first argument passed to your callback is the window that is supposed to receive the function. so if you had a form named winForm and a callback called closeCallback you can do this:
Code: [Select]
winform:bindEvent("close", closeCallback)

You closeCallback function then looks like this:
Code: [Select]
function closeCallback(window)
   print("Caught the close event")
   form.close(window)
end

This takes away a lot of coding and excess code from the original way that it was supposed to be done.
« Last Edit: August 04, 2013, 09:54:59 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 #336 on: August 06, 2013, 01:58:17 am »
Here is a kind of test application. It uses several of the new concepts presented in the new WZ, such as function binding and that page control. I also added something special. I wrote it just today. I am introducing the new styled dialog. Currently there are three styles: OK, OK_CANCEL, and OK_CANCEL_TRYAGAIN. All you have to do is provide the callback. There is currently 3 things passed as arguments to your callback function:
callback(code, buttonObj, buttonObj_Parent).

the code is a 1, 2, or 3; They represent the button that were pressed.

I am not done with them, design wise. For functional purposes they are releasable.
<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 #337 on: August 06, 2013, 09:20:56 pm »
Does anyone know a good way to figure out an index of a string based on a pixel value?
« Last Edit: August 06, 2013, 10:41:45 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 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 #338 on: August 07, 2013, 12:36:46 am »
Sadly I don't D:, but glad to see a test application above. I'm gonna give it a try when I get some time :)

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 #339 on: August 07, 2013, 01:26:51 pm »
That would be great. I am going to make several test applications in the near future, to release with WZ 2.5 in order to demonstrate several of the things that can be done with it.
Also I noticed that on Windows 8.1 the Nspire software dosent close properly, the window closes but it still runs in the background and wont let you open a new instance of it untill you kill the previous process.
<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 #340 on: August 08, 2013, 12:43:47 pm »
I've been working on the statusbar recently, and I have made significant progress. It should be finished or almost finished by the end of the day.
<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 #341 on: August 12, 2013, 09:09:13 pm »
Is there a way to get the value returned by a chunk loaded with loadstring?
I have tried:
pcall
xpcall
I also tried to set the environment with setfenv, but to no avail.
<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 #342 on: August 15, 2013, 12:47:34 pm »
I'm ready to say that there is a bug in TI's Lua. When you call a function created by loadstring, you are supposed to get any of the values returned by the function. That is not happening.
<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 Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Updating WZGUILib
« Reply #343 on: August 16, 2013, 02:56:00 am »
Can you post your code? So far I never have had a problem with it.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Updating WZGUILib
« Reply #344 on: August 16, 2013, 08:00:38 am »
Indeed http://www.wowwiki.com/API_loadstring#Returning_values (among other) suggests there is no problem getting returned values.
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation