Saturday, June 13, 2009

More Component Work Done

Since Sunday I've managed to get some harder code written in the component system for this GUI designer I'm working on. I was surprised at how much work was required to support the AddChild and RemoveChild methods for windows and views. It's not quite there yet, but it works well enough for some of my test code to work on other things.

The component code allows for something like reflection -- you can get a list of interfaces that an object supports and a list of its properties, so if an object implements the PView interface, you can, for example, expect to be able to change its ViewColor property and see its background color change. One of the coolest parts of the API that I've built is that I changed *one* name in the code and rebuilt the test program and a button became a checkbox! The component API itself doesn't lend itself well to manual coding -- more effort is required to set and get properties, for example -- but it isn't really intended for that. Getting a list of an object's properties, making an editor for each, and modifying the object's values from these editors will be very easy and not require very much effort.

All of this hammering on a project has also exposed some small bugs in Paladin's stable and development branches, including a crash that I fixed last night. As soon as I can get PalEdit's sources fixed to build with GCC4, the official 1.0 release will be going out the door. Man, I love summer vacation!

No comments:

Post a Comment