‘Archive Task’ button done!

Yes you read it right, the button giving me so much trouble last time has been completed, relatively easily I might add, loop through, read the task, check it against the task you want archived and write the remaining tasks to a new file, delete the old todo.txt and rename the new one to todo.txt, much easier than what I had to do before, and this time around you can read and edit the file without the need for a special button because VB 2008 doesn’t put quotes around strings in text files, it’s nice really made my job much easier, now I just need to create a ‘View Archived Tasks’ button, which will basically load a new form and call a slightly edited version of procedure that loads the Todo tasks, I uploaded a version to sourceforge last night but I ran into some bugs when I ran through error checking one more time so just don’t download that file, I put it in the Alpha .01 package I believe.

Advertisements

‘New Button’ Complete

The New Task button is complete! I was having a weird problem where I would write this to the file:TaskCategory & TaskName & vbNewLine vbNewLine means exactly what you think it does, it’s basically the same thing as hitting enter when you have notepad open, because that’s basically how Todo.txt GUI runs, it edits the notepad file while you just click the buttons and enter the information. Anyways while I was writing vbNewLine it added a blank line between each task which totally messed up how the program displays all the tasks in the listbox so instead of writing vbNewLine I wrote nothing! exactly I was confused to but I realized that when you write nothing VB puts a line terminator into the file so it continues to the next line; now onto the Archive button, lots of loops and writing, hopefully not too much pain though.

A Breakthrough!

I have figured out how to easily read and write using the Streamreader and Streamwriter classes. For anyone who doesn’t know what these classes are they are a new way to read and write information from files, I originally was scared by the idea of learning a big new class but after reading the example here I was not so intimidated, it’s a very simple way to do it, the only difference is after each line I write in I will have to use the constant vbNewLine which you should be able to guess what it does. So the project should be moving ahead a little quicker now.

Small setback, I found out that somehow the whole project was deleted, god thing I hadn’t done too much on it sonce I got back and I don’t comment anything so I would have been totally lost as to what I needed to do anyways but I have a preview for you guys:

Photobucket