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

Pages: 1 ... 38 39 [40] 41 42 ... 46
586
News / Re: nRemote : Control your TI-Nspire from your computer !
« on: October 07, 2012, 02:22:02 pm »
When running an ndless program nRemote stops responding. The screen disappears and I have to force close the program by using task manager. Is it not compatible with ndless or does ndless block I/O through USB when running a program?
[edit]Also, where are the recordings saved?

587
Lua / Re: Screen trouble
« on: October 07, 2012, 10:24:28 am »
Now I'm having a different problem (or maybe I'm trying to do something that can't be done):
Code: [Select]
function on.paint(gc)
 if screenNeedUpdate then
     for i=1,2 do
         for ii=1,5,1 do
             tile = string.sub(map[i], ii, ii)
             if tile == "G" then
                 gc:drawImage(tileGrass, tileGrass:width()*ii, tileGrass:height()*i )
             end
             if tile == "W" then
                 gc:drawImage(tileWater, tileWater:width()*ii, tileWater:height()*i)
             end
         end
     end
     refreshScreen()
     screenNeedUpdate = false
 end
end
What I want to do is only update the screen when it is necesarry. I wanted to do this by setting a flag, screenNeedUpdate, with the idea being when this flag is true, that piece of code is executed and if not it isn't. The problem is,when I set the flag to true it paints everything but when set to false everything but on tile in the upper left corner disappears as soon as another key (or anything) happens.
[edit] they all disappear, the one staying there was because of wrongly placed code :P
[edit2] solved

588
Other Calculators / Re: Post your Ncraft creations here.
« on: October 07, 2012, 08:40:08 am »
For recording/screenshots:
You can also use nRemote to capture from your actual hardware: http://ourl.ca/16836

It doesn't work with ndless (at least not for me)

My creation will appear here soon

589
TI-Nspire / Re: nCraft (3D minecraft-like game for the nspire)
« on: October 07, 2012, 08:28:21 am »
* annoyingcalc hugs Chockosta BEST NSPIRE PROJECT EVER!

you should make it like minecraft alpha, with the backgrounds having dirt blocks and have an option for 10 worlds
Thanks for the support :D
A "dirt" background would indeed look nice.
What is a "dirt background" ? ???
He means the background of the minecraft menu in the days of alpha/beta:


That save support is awesome  :thumbsup: Downloading right now. Finally I can save and show you my builds :D

590
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 04, 2012, 09:33:32 am »
It boots up pretty fast. That's awesome. If it keeps going at this speed, the project will be done in no-time. Keep it up!
Any chance of a snapshot download or anything, to show to everyone I know :P

591
Well I might happen to have the 3.1 CAS OS file on my netbook but idk if I'm allowed to share it?
I don't see a problem sharing it, but I don't know if its allowed by the forum rules to post a link here in the thread.

592
TI-Nspire / Re: Calling all Linux Kernel developers!
« on: October 02, 2012, 01:47:25 pm »
(knowing it's practically impossible to crack the 2048 bits RSA keys to sign third-party OSes)
2048 bits o.0
On topic:
No freaking way! This is so awesome, I don't even have words for it! Really hope this finishes. If only I could help in some way :(

Maybe with ndless USB support we can have a hook up a hard/flashdrive and use that as filesystem?

593
TI-Nspire / Re: nMah - Mahjong clone for nSpire
« on: October 02, 2012, 01:39:00 pm »
Oooh nice! I love mahjong :D Downloading this right now. Good job! And looking at the screenshots, it seems the problem of distinguishing tiles isn't a very big problem :)

594
Lua / Re: The animal crossing team.
« on: October 02, 2012, 02:36:10 am »
As for the string, I know is a local joke here, but never cared to read what is really about...
*ElementCoder lost the game

The Game is a mental game in which you try to avoid thinking about The Game. The moment you realize you are playing The Game, you've thought about it and therefore lost. When you lose you have to tell everyone in you direct surroundings that you've lost The Game. The rules are quite simple:
1. Everyone in the world participates in The Game. You cannot not play The Game and you can never stop playing.
2. Whenever you think about The Game, you lose.
3. You have to tell people in your surroundings that you've lost the game.

595
Lua / Re: Reuse of code/classes?
« on: October 01, 2012, 11:09:16 am »
Oh why didn't I know of its existence before :o this is extremely useful since I'm working on a pretty large project :)

596
Lua / Re: Need help with lua
« on: October 01, 2012, 02:50:51 am »
Are OS 3.1 scripts completely compatible with 3.2?
I know 3.0.x ones aren't.
I think also instead of Luna you can use the TI-nspire Scripting Tools, but I haven't actually tried it myself.
I believe they are if you state "platform.apilevel = "1.0" on the top of your script, but correct me if i'm wrong.

597
Lua / Re: Problem with menu separation line
« on: October 01, 2012, 02:36:33 am »
So we do have contact with TI here? Wow that's quite nice.

598
Lua / Re: Problem with on.loseFocus() function
« on: October 01, 2012, 02:31:07 am »
Next time you'd want to post your code in code tags (see below). That makes it much easier to read :)
Is the order of entered code (I am a newbie in Lua generally) important, too (e.g. of class definitions, variable definitions, event handlers)?
Sometimes it is, sometimes it isn't. Variables for example need to be declared before you use them. For example, you cannot do x+1 when you haven't said x=<value> before. But functions sometimes don't necessarily need to be declared before they are called.
Spoiler For Code tags:
Code: [Select]
InputField = class()   -- a class I use to enter input variables

function InputField:init(name,x,y,init_value)
    self.name = name
    self.x = x
    self.y = y
    self.editor = D2Editor.newRichText()
    self.editor:move(x+30,y)
    self.editor:resize(100,28)
    self.editor:setBorder(1)
    self.editor:setText(var.recall(name) or (init_value or 0))  -- initially store at construction time: init_value (if defined) or 0 (if not defined) or already stored variable value (if the page is re-entered)
    var.store(name,self.editor:getText())
end

...

function InputField:storeVariable()   -- called by clients like on.loseFocus() function
    var.store(self.name,self.editor:getText())
end

...

function on.construction()  -- create "objects"
    ...   
    field = {}
   
    field[1] = InputField('er',2,4)
    field[2] = InputField('ev',2,34)   
    ...
end

function on.getFocus()
    field[1]:setFocus()
end

function on.loseFocus()
    for i = 1, #field do
        field:storeVariable()
    end
end

599
TI-BASIC / TI-Nspire BASIC Programming Guide
« on: September 30, 2012, 11:59:46 am »
Looking for the Nspire Lua API Reference Guide I happily googled "TI-Nspire scripting api pdf" and came across this:
http://www.sharinginspiration.org/contribs/contrib_1/part_A/Programming-with-TI-Nspire--final.pdf :)

600
Lua / Re: Problem with on.loseFocus() function
« on: September 30, 2012, 11:52:14 am »
The on.construction() function is called once, namely when you open the document. For the other problem, if I understand correctly you'd want to do something like the following, right?
users switches to other page>store all entered values>reset values on the other page
The on.loseFocus() is called when user input focus is lost (I don't know when that is) May indeed be a bug like jim said, it works fine for me too. Personally if I'd wanted an event to fire when moving to a new page, I'd use on.deactivate() instead.

[edit] I also recommend having a look at the scripting api reference guide by TI http://bit.ly/P4dxnY
[edit2] Aww jim you beat me (why did I have to go fetch a drink while typing this comment :P)

Pages: 1 ... 38 39 [40] 41 42 ... 46