Recent development news
I haven't posted here in a bit, so here's the skinny on some of the latest changes to the framework. I've made some decent progress with migrating the Carbon OS X code base to Cocoa, Cocoa is actually, for the most part, much less hassle to use.
In the bluesky directory I added a small project to experiment with a StringPool class, made some progress with it, but it's not ready to replace the std::basic_string based String class yet. Some issues remain in finding a better performing associative container than the std::multimap class. The problem is that I'd like to re-use an existing string if it's already in the memory pool. This means performing a lookup and possibly an insertion, both of which are somewhat expensive. If someone has experience with implementing a string pool (or something like it), please contact me, I'd sure appreciate some help with this.
I added in validation support in the Model class, so that we have more sophisticated generic data binding now, and I've added various model adapter classes that make wrapping existing objects and collections easier. The MVCAdapter example demonstrates this, showing how to display a collection of objects, and extract column names and details for for the object dynamically at runtime, without any code other than the declaration of your custom object and the VCF's rtti registration code.
The example also shows how to set up validation rules, such as limiting the input value to be less than or equal to some value. Again, this is done without code, instead creating various components through the VFF file setting properties.
To make input validation easier, I also added some classes, ported from the MFC originals by Alvaro Mendez (http://www.codeproject.com/KB/edit/validatingedit.aspx). Again, we can manipulate these without writing any code, using VFF resources:
object alphaNumValidator : VCF::AlphaNumericValidator maxCharacters = 10 end object numericValidator : VCF::NumericValidator end object maskedValidator : VCF::MaskedValidator mask = '(###) ###-#### x####' end object currencyValidator : VCF::CurrencyValidator end
Another example from CodeProject, http://www.codeproject.com/KB/WPF/WPFBusinessAppsPartThree.aspx prompted the BusinessObjectValidation example, which also demonstrated how to validate an object and to populate the various fields.
And thisis after filling in some data - notice that the red highlights on the labels have changed as a result of valid input.
Finally, some updates to the HTMLKit allow for MVC integration as well, and for more fine grained control over handling HTMLElement events.
You can now assign model keys to a DOM element, and if the elemnt is an InputElement, then the edit you make can be posted back to the model!