Author Topic: To Do manager  (Read 9539 times)

0 Members and 1 Guest are viewing this topic.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
To Do manager
« on: November 27, 2011, 01:24:39 pm »
in a hurry i started writing a kind of To Do manager for the nspire.
I felt like, wow, i haven't seen many apps for this calc  :w00t: , let's write one  ;D as i didn't felt the power to work on tetris...

now i'm just giving it some extra lay-out and a function to delete item per item, for now you can only delete them all together

you can store as many to do's as you want, and scrolling makes you see them all (not with multiple pages, all on 1) you can see this in the screenshot, release for tonight i think



i notice i did write heven't xp i never saw it during the "filming", so don't laugh at me for that xp
« Last Edit: November 27, 2011, 01:28:12 pm by Nick »

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: To Do manager
« Reply #1 on: November 27, 2011, 01:26:27 pm »
Very nice :)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: To Do manager
« Reply #2 on: November 27, 2011, 02:21:07 pm »
This is really nice indeed, the overall is graphically great :D

Also, why such short description ... ?
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: To Do manager
« Reply #3 on: November 27, 2011, 02:29:43 pm »
thx, well, i don't really know how to make it possible to have multiple lines (for drawing reasons). When is display it, it would have to know when it has to start a new row, and then the total lay-out will be f***ed up... so if you know how, tell me, it would certainly improve it (by now the description must be 30 chars long, instead of 20 in the movie)
« Last Edit: November 27, 2011, 02:30:19 pm by Nick »

Offline renatose

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 209
  • Rating: +4/-0
  • watch out the power balls
    • View Profile
Re: To Do manager
« Reply #4 on: November 27, 2011, 07:08:22 pm »
hmm... I can see some usefulness on this, good job nick!

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: To Do manager
« Reply #5 on: November 28, 2011, 03:21:48 am »
thx, well, i don't really know how to make it possible to have multiple lines (for drawing reasons). When is display it, it would have to know when it has to start a new row, and then the total lay-out will be f***ed up... so if you know how, tell me, it would certainly improve it (by now the description must be 30 chars long, instead of 20 in the movie)

I think [lua]gc:getStringWidth[/lua] will be a big help :)
What you should do is split the sentence in chunks of words (by splitting by space). Then make a variable to store the text in.
Make a loop were you check the size of the variable plus the next word (using the above function). If its bigger than the screen width ([lua]platform.window:width[/lua]), print the variable and start a new sentence with the next word.
That way you will be able to nicely print stuff :)

(of course it is a bit more hard than what I write, but I think you will get it)

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: To Do manager
« Reply #6 on: November 28, 2011, 03:32:27 am »
brr xp well,i certainly give it a try, then it could be used as a notepad too, what would be very usefull...

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: To Do manager
« Reply #7 on: November 28, 2011, 12:13:11 pm »
Nice program ! (even if I don't use my calc to remember things)

BTW, I've already used Jim's method, it's not really hard to do.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: To Do manager
« Reply #8 on: November 28, 2011, 03:31:02 pm »
i've tried over 10.000 possibilities, but it still does not work for some mysterious reasons :'( this is my code:
Code: [Select]
text = "Hello there, something has to be written here"
temptext = text
tempsentence = ""
textsave = ""
drawtext = ""
sentnr = 1

function on.paint(gc)
for i=1,string.len(text) do
if string.sub(text,i,i+1)==" " then
gc:drawString("space",0,180,"top")
tempsentence = tempsentence..string.sub(temptext,0,i)
end
if string.len(tempsentence)==20 then
gc:drawString("20",160,180,"top")
gc:drawString(tempsentence,0,10*sentnr,"top")
temptext = string.sub(temptext,20,string.len(temptext)-20)
sentnr = sentnr+1
tempsentence = ""
end
end
end

it uses string.len() for now, just to make it work, i will change this if it works...
i've placed those "space" and "20" drawstrings to see if it passes them, and they just won't appear, but it loops the for, so something has to be wrong with that string.sub(text,i,i+1)

But now the nice stuff:
Editting the note works, you can now fully adapt the note when stored, even the priority can be changed!
scrolling improved (maybe i'll ad a sidebar)
« Last Edit: November 28, 2011, 03:38:59 pm by Nick »

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: To Do manager
« Reply #9 on: November 28, 2011, 08:50:51 pm »
a revolution has changed this manager a lot!
now it has live wordwrapping, see screenie, and a fully unlimited description.
so now every entry has: a title (max 30 chars), a priority (1-5) and a description (unlimited, only limited by screensize as it doesn't scroll...)

maybe i should change the name of the program, as it's starting to look more like a text editor :)

--edit--
i just saw some pixels on the left side of the screen seem to be cut off, but you can read the letters completely irl
« Last Edit: November 28, 2011, 08:52:03 pm by Nick »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: To Do manager
« Reply #10 on: November 28, 2011, 08:55:13 pm »
i've tried over 10.000 possibilities, but it still does not work for some mysterious reasons
Over 10?

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: To Do manager
« Reply #11 on: November 28, 2011, 08:59:30 pm »
ten thousand i mean... but it's fixed, as you can see in the screenie

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: To Do manager
« Reply #12 on: November 29, 2011, 03:51:49 am »
Looks good, glad you managed to solve it :)
If you want scrolling, you should also split by newlines (before you split by spaces). You also need to count the lines made by word wrapping.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: To Do manager
« Reply #13 on: November 30, 2011, 07:45:49 pm »
Here it is, nearly downloadable (as soon as it gets approved)

a totally new app for the ti-Nspire
now you can save task, each with a title, description and priority!

simple, but good GUI

download here


Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: To Do manager
« Reply #14 on: December 01, 2011, 06:26:59 am »
Congratulations !

I added it on TI-Planet.org here.



By the way, attached is the version with both English and French, and with reduced lua (thus .tns) source size (by optimizing the TI.Images).
(this is the version uploaded on tiplanet)
« Last Edit: December 01, 2011, 06:43:20 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation