This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - jwalker
Pages: 1 ... 17 18 [19] 20 21 ... 45
271
« on: July 09, 2012, 08:26:27 pm »
Ive got some bugfixes for you. I found them in the lable and dialog multiline drawing code. Here is the file, it shows the work I have done so far, as you can see I have changed the looks of a few controls, mainly I just resized them.
272
« on: July 05, 2012, 11:13:02 pm »
So just a general update. First I am going to start changing WZGUILIB to use the new lib system. Second I have started making the 'Programming with WZGUILIB' documentation. It will be written in HTML. I'm using web matrix, but I think as long as I dont do any asp.net stuff it should work on all of the other OS's
273
« on: July 05, 2012, 08:44:12 pm »
that would be awesome
274
« on: July 02, 2012, 07:17:00 pm »
Very cool, I havnt seen any Nspire basic games released for a long time, that have graphics anyway.
275
« on: July 02, 2012, 07:10:15 pm »
that works. thanks jim
276
« on: July 02, 2012, 03:54:32 pm »
It didn't work. The second I make Wgc or Wself local it will give me the 'attempt to index a local 'Wgc/Wself' a nil value' error
EDIT: I changed some code in the WZEX_lib file to this: Wgc:drawString(Wself.zs, Wself.x, Wself.y, "top") and I got an error about indexing Global Wgc, even though there is a local Wgc. It seems to be looking for globals only.
277
« on: July 02, 2012, 03:17:58 pm »
true, I will have to try it and post my results.
EDIT: that works, I wish there was a better way to do it tho...
278
« on: July 02, 2012, 02:20:50 pm »
well i got a responce from the TI technical support, a very nice email telling me that Lua scripting is not supported at this time.
279
« on: June 29, 2012, 08:23:54 pm »
Even though this is kind of a double post, I think we may have stumbled on to a Ti-Nspire Lua bug... Say you create a class outside of the string you want to load, or even try to use gc, it will always say that that variable is nil I even tried this:
********************This is the main lua script
ccsb = class() function ccsb:init(x, y, zs) self.x = x self.y = y self.zs = zs end function ccsb:paint(gc) local Wself = self local Wgc = gc loadstring(painter)() end --- function loadLibs() painter = var.recall("WZEX_lib\\s__paint__") end function on.construction() ss = ccsb(1, 1, "This is the main string") loadLibs() end function on.paint(gc) ss:paint(gc) end function on.charIn(ch) platform.window:invalidate() end
*******************this is inside of the WZEX_lib.tns file
"local WZself = Wself local WZgc = Wgc WZself.x = WZself.x + 10 WZself.y = WZself.y + 10 WZgc:drawString(WZself.zs, WZself.x, WZself.y, ""top"")"
Even though I tried to use a variable to point to the object as you can see, it is still considered nil inside of the loaded string. Anything you are not trying to index will be created/modified like normal. I have attatched the files.
280
« on: June 29, 2012, 03:48:43 pm »
No, I only use string.sub to display the end part of the error message created by pcall()
281
« on: June 29, 2012, 11:02:17 am »
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
282
« on: June 28, 2012, 08:08:49 pm »
thanks, maybe its a student software bug?
283
« on: June 28, 2012, 01:13:26 pm »
Me too
284
« on: June 27, 2012, 11:32:47 pm »
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.
285
« on: June 27, 2012, 10:43:51 am »
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.
Pages: 1 ... 17 18 [19] 20 21 ... 45
|