Show Posts

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 - Jim Bauwens

Pages: 1 ... 29 30 [31] 32 33 ... 125
451
News / Re: TI-Nspire OS 3.2 is out!
« on: June 07, 2012, 04:06:47 am »
I have just successfully removed my 3.2 dev version and installed the production version.
Anyway, TI did not yet update the links on their website. It's not yet officially out :P

452
Lua / Re: Lua and 3.2
« on: June 07, 2012, 03:34:14 am »
1) Do you mean objects ? (obj1 = TheGame() )
Normally yes, as this will run before all other events and they will be declared when other evens run.
2) It's on of the two, no or in between :)
3) I haven't tried to use this function yet. As soon as the new documentation is out I'll link it here so you can have a peek in it :P
4) TI removed it several build versions ago, where we warned several people that it would go away. It might return in the future, but I can not guarantee that..
It's also worth noting that TI never mentioned this function, as it still had some bugs.

The tutorial should not take too long ..

453
TI-Nspire / Re: PTTKiller - Enable access to documents in PTT mode
« on: June 07, 2012, 03:27:13 am »
Also, this tool will probably be used by people to cheat. I know cheaters will find a way, but that doesn't mean we should make it easier for them.
I can understand in some ways that you are angry at TI and release it, but I disagree.

This will give TI finally a good reason to block us.

Edit: But of course I respect the work you put in it...

454
Lua / Lua and 3.2
« on: June 07, 2012, 03:15:24 am »
So, the new TI-Nspire OS 3.2 is out. What does that mean for Lua developers ?
Well, a lot ! There are some important changes that you all should know about, in order to make your applications works perfectly on 3.2.
TI has done a great job keeping compatibility, but there are some tiny stuff that might cause certain programs not to run (properly).


Compatibility mode
Let me first begin with the compatibility mode. TI has 2 "apiLevel's" in 3.2. apiLevel 1.0 provides backwards compatibility for <3.2 OS's by keeping the old API structure.
All documents created for 3.1 and previous will run in that apiLevel by default. This is because some changes in the XML structure of the document. So most programs and games should run fine by default.
Then there is apiLevel 2.0. This apiLevel has some big changes to the API structure, so you will have to update some of your code in order to have some of they new 3.2 stuff. However, it is currently not possible to create apiLevel 2.0 documents with Luna due to changes in the XML structure. I have given the details of the changes to ExtendeD so he will probably update Luna soon.

For the best support and guarantee that you are using the correct apiLevel, you should add the following to the top of new Lua documents you create:
Code: [Select]
platform.apilevel = '1.0'

or

platform.apilevel = '2.0'


Please note that using apiLevel 2.0 with the current Luna will result in an error. (I have a little customized version myself, but I'm not going to release it because it's Linux only, and I'm sure ExtendeD will update Luna soon.)


Events
*on.create is removed in apiLevel 2.0 and replaced with on.construction. This event handler is guaranteed to run before all others.
* on.getFocus is called when the script receives user input focus.
* on.loseFocus is called when the script loses user input focus.
* on.getSymbolList is called when the script app symbol list is being serialized to the clipboard.

Graphical operations
* Most graphical operations are now anti-aliased. This makes that applications look more pretty :)
* gc:setColorRGB now supports one number as input (as well as the old style). For example, you can do gc:setColorRGB(0xFF00CC) or gc:setColorRGB(0)
* You can not use coordinates for drawing to the screen above/under (-) 32 000. Normally this shouldn't affect anyone, but because of this Cubefield refuses to run.

* In apiLevel 2.0 platform.gc() is removed and replaced with platform.withGC(). An example of it:
Code: [Select]

function getStringWidth(str, gc)
  return gc:getStringWidth(str)
end

function on.construction()
  local strw = platform.withGC(getStringWidth, "The game")
end

So what it does it call the function you give as first argument and pass a dummy GC to it as last argument.

D2Editor
D2Editor is greatly improved, and it finally useful :)


require
There are three modules that you can 'require': physics, color, and strict.
The physics module is the chipmunk physics engine.
color is just a table containing colors. color.red (or color["red"]) will return the color code for red.
I have no idea what strict is or does :P

Usage: require 'modulename'


Physics
Maybe the best part of it of. OS 3.2 now includes the Open Source Chipmunk physics engine, and you can use it right from Lua!
This will allow some great games and applications :)
However it's is far to complex to detail in this post, so I will probably write a tutorial about it soon :)


Image
Normally 3.2 would have many updates to the image, but sadly enough they did not make 3.2 and are pushed for the next OS.
However, there is one function that made it, and that is image.rotate. This allows you to rotate images in anyway.
But beware, it is not the fastest function out there.

Math
math.eval has got some friends: math.evalStr, math.getEvalSettings and  math.setEvalSettings.

Platform
I already mentioned platform.withGC, but there are still two other newcomers:
* platform.registerErrorHandler, this allows you to take actions when an error occurs in your document. Pretty nice :)
* platform.window:setFocus, regain focus in your script.
* platform.hw(), returns a number corresponding to the device the scripts is running on.

Variable
* var.recallAt, fetch data from a certain spot in a list or matrix
* var.makeNumericList, create a list in the symbol table. The create list will work much more efficient with other var functions.

Toolpalette
In apiLevel 2.0 the names of toolpalette items may be changed dynamically while the program is running. Calling toolpalette.register(nil) deactivates the toolpalette.

Well, that's about it. I'm sure there are some stuff I forgot, but you can find them all in the API documentation here http://education.ti.com/downloads/guidebooks/ti-nspire/3.2/TI-Nspire_Scripting_API_Reference_Guide/TI-Nspire_Scripting_API_Reference_Guide_EN.pdf .
Good luck and may the coding force be with you!

Links:
Wiki version of this post with more details

455
Humour and Jokes / Re: Weird/funny pictures thread
« on: June 05, 2012, 04:41:25 am »
I think he's a troll, just the way he responded.

456
News / Re: First Nspire OS 3.2 demo on a calculator
« on: June 04, 2012, 10:42:34 am »
No, all I have is a warning tool. But it should be fairly trivial to block it (just need to edit host file).
Anyway, I do not think they will do it.

457
News / Re: First Nspire OS 3.2 demo on a calculator
« on: June 04, 2012, 10:35:48 am »
It might be, and it won't be TI's best day if they do it.

(Anyway, I have a warning system set up so everyone will be warned in time if they enable the ForceUpgrade thing)

458
News / Re: First Nspire OS 3.2 demo on a calculator
« on: June 04, 2012, 08:14:27 am »
We don't know that.

459
News / Re: Update or repair your TI-Nspire CAS+
« on: June 04, 2012, 07:06:14 am »
It will not be possible to upgrade it to a production model, as the hardware is too different.
We are testing if certain flaws used in Ndless 1.0 work on the CAS+ OS.

460
In fact, Ndless is very similar to a virus :P
It exploits bugs, manipulates stuff in memory, makes itself run at boot and other stuff.

461
Lua / Re: [Howto] Check if a key is pressed down (more or less)
« on: June 03, 2012, 02:57:17 pm »
You got that in your original code. I suspect because [ key] acted like a bb code or something. 

462
Lua / Re: [Howto] Check if a key is pressed down (more or less)
« on: June 03, 2012, 02:53:09 pm »
Hi, please don't try to double post and next time put code in a bb code tag ;)

Try replacing "nobbc" with "key" (in the entire code).

463
Lua / Re: [Howto] Check if a key is pressed down (more or less)
« on: June 03, 2012, 02:25:42 pm »
What are you trying to do ?
If you post some code we could help you more :)

464

Notice that this is an image.
Pretty clear to me, don't see what it has to do with the topic :P

465
TI-Nspire / Re: Ndless Commander -- TI-Nspire File Browser
« on: June 02, 2012, 05:17:09 pm »
Very nice!

Pages: 1 ... 29 30 [31] 32 33 ... 125