Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
24 May, 2013, 17:43:50 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 6 7 [8] 9 10 ... 21   Go Down
  Print  
Author Topic: Updating WZGUILib - Updating would like input  (Read 11735 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #105 on: 17 June, 2012, 16:56:53 »
0

I just thought I would post what it looks like when you change the on.create to on.construction on the "UseThisFile.lua" file that I had provided above and run it in 3.2...

What this means is that if I want to still have 3.1 compatibility, I will have to have diffrent drawing code, at least for strings.


* 06-17-2012 Image001.jpg (14.77 KB, 480x360 - viewed 118 times.)
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197


Total Post Ratings: +185

View Profile WWW
« Reply #106 on: 18 June, 2012, 00:27:55 »
0

That doesnt sound right. I don't see why drawing-related stuff would get changed... ?
Can you post the full code, I'll be helping you Tongue
(Edit:  or is it directly the UseThisFile.lua ? )
« Last Edit: 18 June, 2012, 00:33:44 by adriweb » Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #107 on: 18 June, 2012, 01:20:30 »
0

It is Directly using the UseThisFile.lua file that that is located in page 7, I just changed on.create to on.construction
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 14:19:08
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #108 on: 18 June, 2012, 08:18:47 »
0

Is the problem related to the "middle" in gc:drawString you used, or did you not use anything before ?

(I recommend you to use "top". I have no problems in 3.1/3.2 with it, as it's the most accurate argument)
« Last Edit: 18 June, 2012, 08:22:36 by jimbauwens » Logged

adriweb
Editor
LV9 Veteran (Next: 1337)
*
Offline Offline

Gender: Male
Last Login: Yesterday at 12:02:44
Date Registered: 13 April, 2011, 18:42:59
Location: South of France
Posts: 1197


Total Post Ratings: +185

View Profile WWW
« Reply #109 on: 18 June, 2012, 13:20:40 »
0

I just put that up on Inspired-Lua's gc:drawString :

Logged


TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #110 on: 18 June, 2012, 15:00:25 »
0

the problem is related to middle, thanks for the help
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #111 on: 22 June, 2012, 02:06:00 »
0

So I have an Idea that could change the way WZGUILIB operates and can be used forever, if it works. I will keep you posted.
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #112 on: 27 June, 2012, 16:43:51 »
0

So I solved the Idea for styles. I believe that I can store all of the paint, checkClick, click, and other methods that deal with how they are drawn and interacted with by the user. What this would allow is having multiple styles on one calculator without having to take up a large amount of space. It also would allow the programmer change between styles in the middle of the program by calling the function loadLibs(). The libs would be loaded at runtime after the creation of the objects and will load only one time unless the programmer calls loadLibs() later on.
I do have a questions though before I jump in and start changing code.
How much does var.recall fail when trying to get external data.

Also I did some testing with loading strings into lua strings and I ran into a problem. The Document that I created I put a string in it, but it wont load. I then used a file that came with Make3D_lib and it loaded the strings successfully. I used one lua file that I created to do this. Did levak do something diffrent than what I did to get his stuff to load properly?
I included the files.

* ddsdfts.tns (1.22 KB - downloaded 8 times.)
* WZEX_lib.tns (1.12 KB - downloaded 8 times.)
* Make3D_lib.tns (23.23 KB - downloaded 8 times.)
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #113 on: 28 June, 2012, 05:32:47 »
0

So I got the strings to load successfully, but I have another problem.
When you use assert() to run the lua chunck, how can you use the variables that already exist?
I get an error that global gc has been indexed so I know something isnt working.
I included the files that I have created in order to test this stuff out.

* ddsdfts.tns (1.22 KB - downloaded 10 times.)
* WZEX_lib.tns (1.32 KB - downloaded 11 times.)
Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 14:19:08
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #114 on: 28 June, 2012, 23:11:36 »
0

Normally if you execute a new lua chunk it should be able to access all the existing variables.
I'll take a look at your code tomorrow.
Logged

jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #115 on: 29 June, 2012, 02:08:49 »
0

thanks, maybe its a student software bug?
« Last Edit: 29 June, 2012, 02:22:14 by jwalker » Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 14:19:08
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #116 on: 29 June, 2012, 11:01:49 »
0

Quote
I get an error that global gc has been indexed so I know something isnt working.

Something like, "Attempt to index nil value gc" ?
Well, maybe you just forgot to add gc to the function parameter ?

Edit:
BTW, assert doesn't run a Lua chunk/function. It just checks that it's not nil. So you would need to do assert(chunkname, "chunk is nil")()
« Last Edit: 29 June, 2012, 13:39:36 by jimbauwens » Logged

jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #117 on: 29 June, 2012, 17:02:17 »
0

yea I get that error, and the example you have shown is how I have it in my code.
It runs the string from on.paint, so I didnt forget gc.
I have also ran the string like this:
loadstring(string)()
and
func = loadstring(string)
func()
I also tried passing gc to each of those things and it failed

Also I have attatched the new files

* ddsdfts.tns (1.32 KB - downloaded 10 times.)
* WZEX_lib.tns (1.01 KB - downloaded 11 times.)
« Last Edit: 29 June, 2012, 17:35:18 by jwalker » Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
someone
LV3 Member (Next: 100)
***
Offline Offline

Gender: Male
Last Login: 22 May, 2013, 19:10:23
Date Registered: 12 January, 2012, 19:07:23
Posts: 48


Total Post Ratings: +9

View Profile
« Reply #118 on: 29 June, 2012, 20:33:30 »
0

Seems like the problem is on the function "string.sub". It might not be loading it when you open the file or something.
Logged
jwalker
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: Today at 16:31:35
Date Registered: 20 December, 2011, 00:20:52
Location: its cold outside
Posts: 608


Topic starter
Total Post Ratings: +11

View Profile
« Reply #119 on: 29 June, 2012, 21:48:43 »
0

No, I only use string.sub to display the end part of the error message created by pcall()
« Last Edit: 29 June, 2012, 21:50:55 by jwalker » Logged


My computer geek score is greater than 41% of all people in the world! How do you compare? Click here to find out!


Support Casio-Scene against the attacks of matt @ matpac.co.uk ! For more information: Casio-Scene shuts down & Matt actions threads
Pages: 1 ... 6 7 [8] 9 10 ... 21   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.283 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.