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 - Levak

Pages: 1 ... 30 31 [32] 33 34 ... 68
466
Were you using OS 3.1 before ?
I can't be sure of what I'm going to say but maybe it is a clue : when connected to the PC, the Nspire won't turn Off automaticly (true) whereas unplugged it enters standby (IIRC).

Remeber that your Nspire (any model) can is powered by USB (you can remove the batteries/accu if you wish check).

468
News / Re: Ndless 3.1 coming soon?
« on: January 10, 2012, 10:29:01 am »

469
Lua / Re: Checkers Lua
« on: January 10, 2012, 09:31:42 am »
It is more than that, look :

Code: [Select]
toto = bool1
toto = bool1 or bool2 -- if bool1, then bool1
toto = bootl1 and bool2 -- if bool1, then bool2
toto = bool1 and bool2 or bool3 -- if bool1 then (bool2 or bool3) seen previously
toto = bool1 and bool2 and bool3 and bool4 or bool5 or bool6 -- if bool1 and bool2 and bool3 and bool4 and bool5 then bool6

And since, in Lua, values are equivalent to true, and nil equivalent to false, it works for every kind of type.

470
General Calculator Help / Re: TI nSpire CX Password?
« on: January 08, 2012, 10:41:23 am »
When Ndless 3 will come out :
http://ourl.ca/14608

471
Lua / Re: Checkers Lua
« on: January 07, 2012, 12:17:29 pm »
I'm trying to use on.timer() to pause. How would you do that?

Code: [Select]
a = true
timer.start(1)
repeat
until a == false

on.timer just sets a = true, but it still gets stuck in infinite loop.  :banghead:

Remeber : you can't stop the excecutive flow.
When you enter in a function like on.[something], you have to exit it as quick as possible.
You can't use timer.start() as an immediate timer until you exited the function.

472
Lua / Re: Lua Classes
« on: January 05, 2012, 10:29:46 am »
Or check EEPro.

Also Levak, I was before you.
* jimbauwens runs

Never said I was first Ö
Basicly, it's Makefile based (or bash like me), you have to concatenate each files in a single Lua file (or xml for the Library version of Make3D)

473
Lua / Re: Lua Classes
« on: January 05, 2012, 10:24:20 am »
Secondly, classes makes your code looking clever, sperated in multiple files, each file is related for one object and co..

how can you do this? i mean, writing every method/class in a seperate file would be sooo useful Ö
For a while here (like 6 months now :D) :
http://levak.free.fr/ftp/nspire/Make3D/

474
Lua / Re: Lua Classes
« on: January 05, 2012, 10:12:12 am »
The principle of classes / objects is simple : you can make copies of it, you can duplicate much much time and reach a certain amount of variables that you can't manage without (or with arrays but ... well you get it).
An object represents a bunch of preperties and a bunch of methods ALL related to this "kind" of object.
That way you won't have troubles to find other function names for this, this or that. Here is an example : "vector1_toString", "vector2_toString" etc... this is bad and painful, just define it once and call the object "vector" and the method name "toString", then, make bunch of that object.

This is a general approach. Now, I'm giving you a _real_ example : Imagine a bunch of aliens sprites and a spaceship (space invaders thus). How are you going to store each aliens positions ?
You can make two arrays, one for x, one for y. Ok. But then you have to manage somthing else : the spaceship position. Another varname x and another y. You reached 2 arrays and 2 vars.
Now let's see with classes : An array of "SpaceShipSprite" objects (aliens), and another "SpaceShipSprite" object for the space ship.
Each position is object.x and object.y (for example) and you only have to manage 1 array and 1 object.

You see now ?

Secondly, classes makes your code looking clever, sperated in multiple files, each file is related for one object and co..

475
Miscellaneous / Re: Post your desktop
« on: January 04, 2012, 02:26:18 pm »
it's "awesome" shell =)

477
Calculator C / Re: Hide documents on TI-Nspire [Ndless]
« on: December 26, 2011, 10:59:15 am »
The screen will be cleared on program startup on CX in the next update to avoid this (the documents screen cannot be displayed in grayscale).

I don't think this is a good idea, really.
As jim said, I only have to put lcd_incolor() and it is ok.

otherwise I can't do that:

478
Calculator C / Re: Hide documents on TI-Nspire [Ndless]
« on: December 26, 2011, 09:43:46 am »
each time the program enter in a loop, glitches apear on the screen ...

Can you please post the guilty code?

A while loop without lcd_incolor() on CX. =)

479
Calculator C / Re: Hide documents on TI-Nspire [Ndless]
« on: December 25, 2011, 06:50:56 pm »
Ok, sorry for double posting, but it seems that it doesn't work as expected on ndless 2.

So I removed show_dialog_box() from the code to make a non-gui version for ndless 2
http://levak.free.fr/ftp/nspire/HideManager/src/hide_nogui.tns

For upcomming ndless 3, I'm developping a password manager, but I have a problem : each time the program enter in a loop, glitches apear on the screen ... I would like to keep the screen as it to fake an error but asking a password in background.
Any idea ?

480
Calculator C / Re: Hide documents on TI-Nspire [Ndless]
« on: December 25, 2011, 05:53:16 pm »
That's a cool program! It'll be neat to try it out once Ndless is finished up and released!
It works on Ndless 2 and 3 as it. no need to recompile it for Ndless 2.
=)

Pages: 1 ... 30 31 [32] 33 34 ... 68