Jump to content

  • Log In with Google      Sign In   
  • Create Account

assainator's Blog



You received a InvalidDesignEvent

Posted by , 06 February 2011 - - - - - - · 309 views

Last past week I moved back to square one as I found out that THE most important thing in my UI framework, the event handling mechanism, was AWFULLY designed. I never came to the idea that some might need to redirect the events to another handler.

Now that's a real stupid mistake.

Take for example the spin control. A textbox with two buttons.
As soon as the textbox' value changes, a callback is called, but the textbox is part of a spinctrl, this would mean another Functor, another call.
For simple controls like spin controls, this won't be a big problem, but once one get to larger controls, this means a lot of rerouting.
Now, with the new design, a user can simply set a pointer to the parent handler and all messages are nicely sended there and nobody has to care about them anymore
Now I know that this still means another function call (SendMessageToParent(Event evt) ), but this way of handling events allows me to dump my template Functor into the trash bin. These template Functors forced me to put everything that needed some sort of callback (such as controls) into headers, significantly increasing compile times and causing debugging to take a lot longer as well




And there are two more bright spots about this redesign:
- development speed - controls don't need no more large declarations, most of the event handling is already done in the lowest base class
- code cleanness - all headers are much cleaner as the code moved to the source files.

I hope that everybody who reads this (if anybody reads this), will take a bit more time to make a proper design now as you can see to what kind of horrors this (not taking enough time for designing) leads.




See you next time.


A word to soon

Posted by , 27 January 2011 - - - - - - · 285 views

'Finished', 'Completed' are big words. When is something Finished? When is something Completed? When all planned functionality is implemented? When all bugs are solved? When all stars are aligned?

The old life
Last Friday I said I finished my very first project only to discover two days later, when I was, full of enthusiasm, working on the next release, that I had a very, very big bug:

The disaster
Let's say we have window one.
Then we create window two and make it a child of window one.
Instead of working properly, the first window got all the messages of window two. So if I want close window two, I will close window one.

The rebirth
This 'disaster' caused me to stop implementing new functionality for a while and looked at what I already had and see how I could improve it. One of the thing I saw was that I had a lot of template classes that didn't need to be templates. So instead of having 12, I now have 8 template classes which really cleaned up a lot of my code.

And that's it. That's all that happened from last Friday to 5 minutes ago when I started writing this entry.

See you next time.


First project ever to be finished.

Posted by , 21 January 2011 - - - - - - · 332 views

About a month ago I started a project which I gave as much hope of ever completing as I gave all my other projects, almost no chance to come close to finishing. Finishing as in useable for future projects. In the past 4 years I must have started over a hundred seperate projects, of which only one, a tiny copy tool, actually got completed. Now I have this strange feeling: A project is actually getting finished?! How?

What is this project of yours?
As said in my previous entry, I was engaged in making a OO win32 wrapper. Along the road I called it "Aluminum" as it was to be light-weight, simple and very robust. It doesn't have all the features of packages like QT and wxWidgets but Aluminum was never designed or never thought of to compete with these packages. QT and wxWidgets both are much more then just a simple UI library: They are multi-platform and have all sorts of sub-libraries like networking. Aluminum doesn't and will most likely never have these features. The only thing that MIGHT make it's way into Aluminum is multi-platform but that is not the goal for a long, long time.

What does it support? What can it do? Good questions,
At the moment Aluminum supports:
- The usage of multiple frames at once
- The creation of modal dialogs (no modeless as you can use frames for these)
- The most basic controls (push button, check-box, textctrl, multiline textctrl and static labels)
- Easy to use/setup (no dependencies, pre-compiled, and a clear and simple directory layout)
- Support for functor driven callbacks
- Very extendible (every control, frame, etc. is derived from a single class)
- Almost 100% OO (A few static functions lying around)
- Full documentation which includes multiple examples

You say finished, really finished? Also a good question.
No, not completely. There are a few wholes that need to be filled, a few bugs that need to be worked out but this only takes time, no effort.
Also, I need to finish documenting everything. I hate libraries that have no documentation, no examples and tutorials. Therefor I'm putting extra effort in it.

Alright, I want to use it!
Thanks, but you'll have to wait a week or two. I really want those whole filled and bugs solved before releasing anything.


Until next time!







Hello blog

Posted by , 14 January 2011 - - - - - - · 407 views
Introduction, Interests
First of all: Welcome to the first entry of my blog. I have absolutely no idea if I should blog or not but as there's no harm in trying I might as well give it a shot.
As I said, this is my very first entry. This is probably be one of the longer posts. I intend to write not so long posts as I personally don't like it. But as I don't have that much to show or present I'm just going to tell something about myself and what my interests are.

First of all, my interests are always shifting. One month I'm interested in Graphics programming, the next I'm all in Virtual Machines and the third week I'm writing all sorts of small libraries But fear not. I am capable of focusing my efforts on small set of projects. Obviously you now want to know what my working on now.
1. A OO Win32 wrapper framework.
2. A OpenGL graphics framework
3. A Scripting language which should support OO programming, a few OO features like Inheritance and polymorphism

Furthermore, I 'like' making mistakes as these are the things one really learns from. If you look at the topics I've started on the forum you'll see I make a lot of mistakes, small ones, big ones, stupid ones, all sorts of mistakes. But I learned from them because I've rarely made any of them again.

So now you know what I'll be posting about every few days. Now you can decide whether you want to watch this blog, see if it brings any good, or not.
Feel free to add comments as this gives me the chance to improve my blogging.

See you next time






Recent Entries

Recent Comments



PARTNERS