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 ... 40 41 [42] 43 44 ... 68
617
Lua / Re: Lua Q&A
« on: August 29, 2011, 10:26:02 pm »
Ok, so it seems that putting a cursor.show in on.create() and on.resize does it...
I can't test right now.

618
Minecraft Discussion / Re: I set up the minecraft server
« on: August 29, 2011, 10:16:46 pm »
I joined \o/

Killed as soon by a spider =(

EDIT : As for FinaleTI I can't destroy blocks

eDIT 2 immediatly after posting : oh it is ol

edit3 : oh no ok it was the spawn point !

edit4 : sleeping the night does't switch to day =(

edit5 : wow .. ok .. every times I want to sleep a mob spawns  ... INSIDE

619
Lua / Re: Lua Q&A
« on: August 29, 2011, 07:48:24 pm »
TI-Nspire ClickPad ?

As I remember my first tests, it was impossible to show the cursor on ClickPad

620
News / Re: The Launch of a new website : TI-Planet
« on: August 29, 2011, 06:12:18 pm »
for me : IE9



* Levak runs (but it was actually true)

621
Other Calculators / Re: Just bought a TI-Nspire CX CAS, came with 3.0.2
« on: August 29, 2011, 04:08:39 pm »
...

More of a simulator, but he got the point.

Ti Nspire Computer Software is only a ... software ? The TI Nspire "Software". The same that you have on your calc, only a software. Only because it is specific for the calc, it is called an OS, and for the Computer, a "Computer Software".

622
Other Calculators / Re: Just bought a TI-Nspire CX CAS, came with 3.0.2
« on: August 29, 2011, 03:27:44 pm »
3) You can already play on the emulator ! ;)

TINspire Computer Software is not an emulator :p

623
Lua / Re: Lua Q&A
« on: August 28, 2011, 11:44:15 pm »
Don't forget to stop the timer with timer.stop() if you don't want to repeat it each second =)

625
TI-Nspire / Re: Pacman Nspire
« on: August 27, 2011, 12:44:46 pm »
+1, look at my Nyan Cat game, sprites blink as it is slow...

626
Lua / Re: Lua Classes and OOP Tutorial
« on: August 25, 2011, 11:16:33 am »
Yeah, thanks you for feedback.
We will work on that =)

627
Lua / Re: Lua Classes and OOP Tutorial
« on: August 25, 2011, 10:52:30 am »
- I fear that the introduction and the "myTable.A.C.D.var" example may lose the reader, since this syntax will never be used, and is just a symbolic representation which doesn't really support inheritence anyway.

Well ... I have no words to answer you on that point. I felt it was important to show the flexibility of Lua tables, that it can handle multi-type elements, such as tables, functions and "objects" (tables indeed).

628
Lua / Re: Lua Q&A
« on: August 24, 2011, 04:07:37 am »
In Lua, classes are tables, tables of tables etc ..

The Lua classes tutorial is not yet translated on Inspired-Lua, you can try a google translate, but some people says they didn't understand it =/
http://www.inspired-lua.org/2011/05/5-object-classes/

I'm going to sum up

If toto is a class and x,y numbers of this class, f1, f2 functions of this same class, and tab a table also in this class.

Then :
Code: [Select]
toto = {
 x=1,
 y=2,
 f1=function() return true end,
 f2=function() return false end,
 tab={
 .....
 }
}

Then you can access to toto.x, toto.y, etc ...
But this is a fixed way to do "classes".

The TI-Nspire Lua framework contains a function that is not part of Lua 5.1 : class()

This function avoids typing multiple lines that many of us won't understand (even if it is quite simple)

With the same example :

Code: [Select]
toto = class()

function toto:init()
 self.x, self.y = 1, 2
 self.f1 = function() return true end
 self.f2 = function() return false end
 self.tab = {...}
end

init() function is required by class(). When you want to create a new toto object, you will do like this : a = toto()
You can give to init() arguments to create a specified object like this :


function toto:init(x0, y0)
 self.x, self.y = x0, y0
 self.f1 = function() return true end
 self.f2 = function() return false end
 self.tab = {...}
end

Then, you will be able to do : a = toto(1,2) and access to a.x and a:f1

Remember another thing in Lua : the difference between . and : between the object and its element :

a.x access to x element in object a
a.f1() access to f1 function in object a
a:f1() access to f1 function in object a and gives to f1 function a as first argument, that way you can use 'self' in its définition.

a.f1(a) == a:f1()
function a.f1(parent) return parent.x end == function a:f1() return self.x end

629
Lua / Re: Lua Q&A
« on: August 23, 2011, 12:04:33 pm »
Code: [Select]
function on.backspaceKey()
if self.var:len() > 0 then
self.var = string.sub(self.var, 1, self.var:len()-1)
end
platform.window:invalidate()
end

function on.clearKey()
self.var = ""
platform.window:invalidate()
end

630
Lua / Re: basic split screen on lua [calculation sheet ]
« on: August 21, 2011, 07:28:35 pm »
You never used the split screen function before Lua ?

You can do so with Doc> 5  2 when you have a document open.

Pages: 1 ... 40 41 [42] 43 44 ... 68