Worklog for MattVonFat

MattVonFat IDE

Return to Worklogs

Moving Vertically(Posted 2006-09-20)
Well moving vertically is now possible.

I though tit would be simple to begin with but I sonn realised the number of possibilities that I hadn't accounted for and had to start part of it fresh. It wasn't too bad though as it was broken down quite well. This also allowed the MoveUp and MoveDown methods to differ in only two words! (First/Last and Prev/Next I think)

I had worried about this as my new way of storing the data is alot more complicated when performing these sort of functions. I ended up with a method to get the position of the cursor in actual characters. Then I had another to convert that number into the datablocks.

It probably doesn't make much sense even if you've followed the worklog from the beginning! I will get round to drawing a diagram of the structure just in case anyone is interested or wants to understand what I'm going on about.

I can now get on to the scrollbars as all the input stuff is pretty much done!

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Delete(Posted 2006-09-17)
I managed to get delete working. This was quite simple due to the similarity to backspace. Testing it was difficult, there are so many senarios that I loose track. I did the important tests, or atleast important to me, which are basically checking that the whole word/character system doesn't get ruined by it, seeing as how this is the basis of the textarea I've wrote.

I also have to work out a way to simulate a character being held down for non ascii keys, such as delete and the arrow keys as they don't work with with EVENT_KEYCHAR which handles all the horrible stuff with ascii keys. It's getting annoying when a test requires quite a few lines and I have to tap my way backwards through what I've written.

I now want to finish off the non ascii keys which include, up, down, home and end. Once these are done I can move on to the textarea GUI and the scroll bars. They shouldn't be difficult as I was smart enough to realise I didn't want to go through all the maths of getting them working!!

After that I will upgrade the drawing routines for the various textarea parts so that it runs more efficiantly and I can start work on the rest of the IDE.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Surprised It Works(Posted 2006-09-13)
I now have backspaces working perfectly! The best part is that it requires a method to join two words together in order to work well. This is the reverse of being able to write characters and start spaces in the middle of a word of line so this is will help later on!

I'm actually surprised this works so well. Only a few minutes ago I was writing a method which, like alot of the methods, has a similar structure with the only differences being in what it does at certain places. I thought to myself "Oh I need to remember to add *somefunction* for it to work right"

I then wondered whether I had put this check in else where. It turned out I had but I have to admit with my forgetfulness when it comes to programming I'm surprised anything works.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Alot Done(Posted 2006-09-10)
A little update on the stuff I managed to get done.

First I got new lines added, but in a certain way. I haven't yet got it so you can start a new line in the middle of a line. Only at the end and beggining. I will probably put off doing the middle of lines until near the end. I also have to impliment inserting a character (not a letter, things like symbols and numbers) in the middle of a line. This is dificult as I have to spilt lists up and do a whole load of swapping about.

With the addition of adding lines, I now have finished off my MoveBack method to account for lines and I have also completed the move forward method!

My final addition is red boxes around words and green boxes around characters. I decided to add this so I could make sure, when testing, that everything was in the right place. I might explain this a bit more in the next post. Basically two words can't be next to each other, if you write stuff to an existing word it should be attached to the existing word. And this, so far, seems to be the case!

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Psychic Coding(Posted 2006-09-06)
I was estatic today when I finished off the basic character input for the new IDE build. Yeah, I have a new one. This must be IDE #5 I think but I'm determined for it to be my last restart. It uses the same functions as the old IDEs but rewritten. I want to get the code as streamline as possible because as the textarea is written from scratch I want to make sure it's not slow by the end.

Anyway, my reason for being so happy was that I wrote the MoveBack method, which moves the cursor back, without being able to test it as I hadn't even written the methods that allow you to type! All I knew was that the code didn't throw any errors. I also wrote the typing methods which allowed characters to be entered in words before I could test. But when I ran it it worked perfectly.

Maybe I've just gotten so good with BlitzMax and coding in general to write flawless code! But I doubt it.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Always a Better Way(Posted 2006-09-03)
There is always a better way to do something.

Everytime I just sit down and think about this I think of a way to optimise some method and make it better. That's causing a bit of a delay.

Another delay is that I've never worked on something so complicated. There's so much code doing so much that even with comments and the documentation that I write for the Types and Methods/Functions it's hard to keep track of exactly what is doing what!

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Almost a month(Posted 2006-07-15)
I've been trying to get work so this hasn't been in full view. I am now getting back to it though. I want to now get the cursor moving properly. I had got it resonably ok but I've realised that its the most important bit if I want to see how everything fits together.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Keeping The Old(Posted 2006-06-18)
I got up to the stage of creating the main program type. This would create the GUI and hold the main loop. I gave it a bit of though and, while I am currently using a text program type, I will try and convert my old one to be used with the new one...that is one of the benifits of OOP right? It already contains a whole load of code for handling the scroll bars and other stuff that I really don't want to have to rewrite as it was hard enough the first time!

I also gave a bit of thought to function folding. I think I've settled on having a stack (or heap - I get them muddled up) type thing, which has a first one last off style. I will also have a simple type, possibly:

Type FoldEnding
    Field ID:Int       'Some form of auto number
    Field FoldType:?   'Possibly a string or ID for the thing i'm folding
End Type


which will be added, and each time an 'End Function' or 'End Type' thing comes up it will check the stack and take the next item if it's the right type. It should only really have errors if the users code has errors. This could easilly be added to my syntax highlighter and if done right not add any noticeable slowdown.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Wonders of OOP(Posted 2006-06-15)
Well I finally have a CursorBack function which moves the psoition of the cursor back (surprise).

Its works quite well and I also got it to do some other stuff which is impressive but would take an hour to explain so I wont bother.

OOP helps alot for it...and i don't think i'm even doing it correctly yet :P

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Whey!(Posted 2006-06-14)
I tested what I had so far. The simple test, which worked with a single line, added the text "he-lo" to the line. What should have happend, and did happen (after I worked out a few OOP bugs I had), was it created a word which held "he", created a character which held "-" and then created a word which held "lo".

No wthat I have this simple code working all the other features should be easy to work out as I have a ground work of how the stuff is stored.

The most imortant part for me to get implemented now is to be able to move the cursor position with the arrow keys. Apart from moving the cursor position by clicking with the mouse this is the hardest part of the new system. It will also let me see how my code will work when it comes to enetering text in the middle and at the beginning of words.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Best of Both Worlds?(Posted 2006-05-30)
If only!

I haven't focused 100% on this recently (partly because I need a job!) but I have realised that this will be difficult.

It will work great with the Syntax Highlighter, which will speed up greatly, and it will probably stay just as fast as the original method. BUT! Its damn hard! When dealing with where the cursor goes, or where text is added I have to know which word I am in and which Char it is on. Sounds simple until I realise I have to be able to keep track of it and change it easilly. I know there is a really easy way. And I pretty much know what it is but I just have to spend some time thinking.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Theories(Posted 2006-05-12)
Well I managed to get a basic text-editor with syntax highlighting working. It's still quite messy though so I thought that rather than going through and cleaning it up now I'd try a few different things out.

I don't think that I have the best data storage for what I'm doing. I had TDocument types which stored TLine types. And the TLine types stored characters.

This would be good for a word processor as it means each character could have different formatting. But as all I want is words to have formatting I am going to substitute TWord for TLine. So now each line will contain words. This should also help with syntax as I no longer have to find the words as the syntaxer runs...the words are already stored and ready for checking.

I was going to try another method with TParagraph instead of TLine. But as programming is quite line focused as opposed to writing which is more paragraph focused I decided that I won't bother with this trial. But if I ever decide to modify my IDE to a word processor I will have a few ideas on which to do it.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Syntaxing(Posted 2006-05-09)
Well I added syntax highligting and found that my original version didn't work very well. It checked everything viewable on screen when a new char is typed. It was the laggiest thing ever. So I created a single line checker which makes it work a whole lot better.

The screen checker has been kept for when it first loads but thats all it's used for.

What happens when you open a doc in it is it loads it completely then does syntax highlighting on what you can see on screen. Then as you get to work it goes through every line off screen and highlights it. This works ok but the start could be a little less laggy.

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Update(Posted 2006-05-06)
As I wont be doing this for a few days I'm going to update a bit.

Syntax highlighting is in. It currently only does red on keywords. It also doesn't capitalize he word as the BlitzIDE does and that may take half a day to do as it's complicated to fit in with the way the data is stored.

Highlighting stuff by clicking and dragging works forwards and doing it backwards may take longer than the syntax capitalization!

----------
"There is nothing like a dream to create the future"
MattVonFat.com

Starting(Posted 2006-05-05)
Well, this is the latest addition to my on going projects. I think this is the 5th (and thats just counting worklogs).

I wanted some syntax highlighting for my HTML/php programming and decided I might aswell try making my own IDE for it. Well I started writing it and it was going well until I reached syntax highlighting. I discovered that with all the fiddly bits in HTML that I might not be able to get get it working properly. BUT I did find that for a langauge like Blitz it would work a treat.

I started a second version, this time planning ahead and testing different methods of doing things. Finally I started number 3 and that is going VERY well.

To get my syntax highlighting to work the way I want I decided to write a custom TextArea using a canvas. So far it works really well and there are only a few things needed to have it working properly.

I have a syntax highlighting method from IDE1 which isn't added yet (save it for later) which I will use (and know works) so that shouldn't be a problem.

Planned features:
- Syntax Highlighting
- Function Folding
- Form Designer
- Use for many languages (BlitzMAX/+/3D,HTML,C++,C#,C (The C's will be added much later as they seem daunting))
- Project management features

And thats just the stuff I can think of right now.

I have good feelings about this (as its already working well)!

----------
"There is nothing like a dream to create the future"
MattVonFat.com