Author Topic: Updating WZGUILib  (Read 156385 times)

0 Members and 1 Guest 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 #150 on: July 22, 2012, 08:26:09 pm »
I actualy have VirtualBox, I need to find an xp image though... cant be that hard
<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 #151 on: July 22, 2012, 08:48:52 pm »
I guess it wouldn't be but my concern is the serial requirement at the start, if any. Although at this point I wouldn't be able to continue the discussion since it would be against Omni rules (piracy). :P

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 #152 on: July 22, 2012, 08:56:05 pm »
yep, also im setting a git repo
<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 #153 on: August 12, 2012, 03:03:54 pm »
Ok just some general news and a question...
First I have found another way to make my code smaller by creating a control class that all controls can inherit from, and as of now I have been able to remove almost all of the control_name:checkClick() functions and replaced them with a generic one, which cut out about 5 lines of code per control, I also discovered some unecessary code in text boxes and removed it from there.
Today I will finaly be able to complete the transfer of major code(paint, click, etc) into the library system.
Today I also will make the WZLL (WZ Library Load) Table, which will control loading and unloading of unecessary libraries in order to conserve memory(hopefully). This way you only will load the libraries that you need, and if you arent using a library you will also be able to unload it. the format will be simple, it will look like this:
WZLL = {{"component_name", string comstring, bool loaded}}
**Notice, in the table it actualy wont have a 'string comstring' the element will just be comstring
The only part of that table you have to worry about is the string 'component' name and the boolean 'loaded'

Now my question is this... is there a way to only draw a certain part of anything stored in gc,
Why Im asking this is if I want to make the windows drag-resizeable or if the programmer makes a lable that goes outside of the realm of the body of the window, I dont want to draw that portion of the said image/string/geometric shape.
« Last Edit: August 12, 2012, 03:04:46 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 Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Updating WZGUILib
« Reply #154 on: August 12, 2012, 04:12:32 pm »
Check out [lua]gc:clipRect[/lua] ;)

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 #155 on: August 12, 2012, 05:25:01 pm »
thanks jim, that should help out alot.
Also as I said I would do, Dialogs now act almost exactly like forms... it even inherits from window :)
Dialogs still look like they used too, but they dont always stay on the top of the other windows/dialogs.
I also updated the color table so that it now includes almost all real color names, not made up ones.
I will post the new dev version soon, after I test it quit a bit more.
Also I noticed in 3.2 that how strings are drawn on the computer are drawn diffrently on the handheld... thanks TI  :banghead:
<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 #156 on: August 13, 2012, 10:34:05 pm »
First preliminary tests of gc:clipRect look great.
Second I will also start planning another new 'technology' that WZ will possibly use in the future if it works out... I will keep you posted
<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 #157 on: August 15, 2012, 10:34:09 am »
So I posted a picture of some of the new functionality of WZ, note this isnt the new tech I talked about....

currently tabcontrols dont follow the rules, but that wont be hard to fix
The input dialog is new, I havnt completed it yet.
also the forms use clipRect, as the pictureboxes lable says l1

The new functionality came because I made a control class to handle things like checkClick, so for some of the controls it shows that it was selected by drawing a dashed rectangle arround it, and it will remain until the user clicks another 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 Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Updating WZGUILib
« Reply #158 on: August 15, 2012, 03:35:47 pm »
Nifty :)

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 #159 on: August 15, 2012, 07:45:34 pm »
thanks :)
<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 #160 on: August 16, 2012, 10:45:00 am »
So yesterday I implemented bieng able to switch between controls using the tab key, and the ability to move a window with the arrow keys
<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 #161 on: August 17, 2012, 11:34:58 am »
Yesterday I added using backtabKey to switch between windows, like how tab switches between controls.
I also made windows drag resizeable, and have it almost bug free.
<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 CompSystems

  • LV3 Member (Next: 100)
  • ***
  • Posts: 68
  • Rating: +7/-4
  • HP48GX,HP50G and TInspireCAS Calculator Programmer
    • View Profile
    • HP48GX,HP50G and TInspireCAS Calculator Programmer
Re: Updating WZGUILib
« Reply #162 on: August 17, 2012, 12:18:08 pm »
As Texas Instruments does not incorporate dialog boxes in tinspire/CAS OS, a program in TIbasic could interact with WZGUILib? or any application written in LUA, ASM or C?
« Last Edit: August 17, 2012, 12:35:07 pm by CompSystems »

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 #163 on: August 17, 2012, 01:51:27 pm »
A function in tibasic can be called from this lib, but you cant call any of the functions nessecary, or even interact with lua, from a ti basic program. This is because they wanted lua to be 'sandboxed'.

For a Lua program, all you have to do is copy the portions from the lua file I release into another file, or make a copy of that lua file and rename it. Then you just create the objects. Notice that if an object is a button, then you have to create the function that it calls and tell it its name when you create it.
examle:
Code: [Select]
  --Do not wory about anything befor this point unless you are using Nspire OS 3.1 or earlier, if so change platform.apilevel to 1.0
  --this is where you create objects
  function on.construction()
   form1 = form(60, 60, 150, 100, false, "Title", color.white, color.black, true, false, mycont, true, true, Icon1, true)
    --code for any previous objects, Any form(s) should be created before add creating controls, as they will be the parent of the control
    button1 = button("BTN1", 4, 4, btnClick, color.black, color.buttoncontrol, form1)
  end

  function btnClick()
  --your code here
  end
you could also write your own controls, but that is advanced and I need to release a dev guid first... which is comming  :)

For C and ASM, I believe for OS 3.1 there are functions in Ndless that can interact with lua, but to what extent I realy dont know.

Also this is for both you CompSystems and everyone else:
Since the example I provided above uses my dev version of WZGUILIB, I am posting it below, Go ahead and test out the new features
Notice** when drag resizing Forms there is a bug that occurs when you go below a specific point, but I almost have it fixed, It shouldnt crash the script

Also this dosnt require any external data, it dosnt use it because I am deving the base Items

***********************How to use the arrow keys to move a form, what the tabKey does, and what backtabKey does******************

tabKey scrolls through the controls in form_name_here.controls, and gives them selected status. When it reaches the end of the list it unselects all controls and allows you to use the arrow keys to move the window. All controls should be surrounded by a dotted rectangle when selected except textboxes, whos carrot appears.
backtabKey scrolls throug the windows in wndTbl giving them the focused status

Arrow Keys will move the focused window 4 pixels in the direction that the arrowKey points.

As always if you need more examples or just need help, Ask me by posting here or you can also PM me.

Also the tns file is form 3.2 and the lua file is for 3.1, but all code except on.create/on.construction and platform.apilevel are the same.


ALSO here are the paramaters for the controls


--~    --params----------
--~       window = --dont need
--~       form = x, y, width, height, fullscreen, title, titlecolor, bordercolor, isdrawn, contextmenu, cmtable, hassb, hasicon, iconimg, draggable
--~     dialog = x, y, text, title, backcolor, titlecolor, bodytextcolor, isdrawn
--~    button = text, x, y, action, txtcolor, bgcolor, parent
--~    lable = x, y, text, txtsize, color, parent
--~    textbox = x, y, width, text, textcolor, tbcolor, parent, selected
--~    radioButton = text, x, y, marked, backcolor, markcolor, txtcolor, parent
--~     contextm = --dont need
--~    checkbox = x, y, text, checked, backcolor, checkcolor, textcolor, parent
--~       pb = x, y, width, height, labeltbl, picturetable, txtcolor, index, lablename, parent, selected
--~       NumericUD = x, y, num, linecolor, maxnum, minnumber, textcolor, pmbcolor, parent, selected
--~     tabcontrol = x, y, width, height, tabtable, parent
--~     listbox = x, y, tabval, selected, scrollbars, parent
--~     toggle = x, y, state, parent
--~     inputDialog = x, y, text, title, backcolor, titlecolor, bodytextcolor, isdrawn, btnAction
--~     cant use: scrollbar, progressbar, statusbar
--~    --end params
paste this in where the current paramater list is

Also to resize forms by dragging, click the little box on the lower right hand corner and move the mouse
« Last Edit: August 17, 2012, 02:22:26 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 Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Updating WZGUILib
« Reply #164 on: August 17, 2012, 02:48:27 pm »
It is possible to make something that allows TI-Basic programs to run Lua stuff. I've done it before, but haven't made any easy  tool for people to use.
But it's possible ;)