tag:blogger.com,1999:blog-33303635685310085112008-05-22T16:27:45.871-07:00Quixote ReloadedJim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-3330363568531008511.post-68626030476384452922008-05-01T09:04:00.000-07:002008-05-01T09:11:14.685-07:00Working with Delegates in Visual Form FilesSo you've got your interface put together via your Visual Form File resource. Now you want to hook up some event handlers or callbacks in your application code to the UI. No problem!
The first thing you need to to is write the code. Let's start off by using our application class as a place to put the callbacks. Later on we'll investigate using the main window class as well, but for now, lets Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comtag:blogger.com,1999:blog-3330363568531008511.post-6823821462500917382008-04-14T19:03:00.000-07:002008-04-14T16:03:47.357-07:00Models, Views, and Items - a Saga for the AgesIn the recent past we had a tight coupling between a Model and an Item. The idea
was that an Item represented an individual "thing", or element of data, in the model. The implementation of the model worked out how to store the item (i.e. as
a std::vector<item*> for example). This meant that the model had to store a collection of Items, regardless of what theses items stood for, and the design of Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comtag:blogger.com,1999:blog-3330363568531008511.post-46620850839700443922007-11-19T10:21:00.000-08:002007-11-19T11:51:00.277-08:00Busy, busy, busyWell between work, soccer, and programming in my spare time, I haven't updated this in a while. So what's the latest scoop in VCF land? Well while the release isn't yet ready (yes I know, it's been a ridiculously long time between releases, but between personnel changes, and volunteer work on Zod's campaign...), there are some pretty cool things in the pipeline.
Most of the newly added Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comtag:blogger.com,1999:blog-3330363568531008511.post-72808199565119628952007-05-19T12:20:00.000-07:002007-05-31T19:29:28.247-07:00ThreadPools in the VCFSo, the threaded methods post got me thinking: if we can create methods that execute in a thread, could we have something fancier such that a delegate's invoke() can take place asynchronously (much like the .Net design of a delegate's BeginInvoke() and EndInvoke())?
Part of the desire for this is to overcome a current weakness in the VCF's delegate design. Currently we can only accept function Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comtag:blogger.com,1999:blog-3330363568531008511.post-38604015927672936512007-05-02T12:55:00.000-07:002007-05-27T21:10:59.789-07:00Visual Form File formatXAML this, XAML that, blah, blah, blah. I get so sick of hearing about how great XAML is, as if this were the most mind altering, earth shaking technology to hit the streets in years. Bah Humbug!
We've had something like this for years in the VCF! And the predecessor to XAML dates back even further than that, to Delphi's form files, NeXT's NIB files, and so on. So, I thought I'd post what the Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comtag:blogger.com,1999:blog-3330363568531008511.post-31505100533119351882007-04-26T12:12:00.000-07:002007-04-26T13:07:19.552-07:00Threaded FunctionsHere's an interesting thought experiment for functions that get executed in a separate thread.
void doit( int i ) {
printf( "Hello from doit! i: %d\n", i );
}
void doit2( Thread* th, int i ) {
printf( "Hello from doit2! i: %d, th: %p, tid: 0x%04x \n", i, th, th->getThreadID() );
}
class Snarfy {
public:
void thisBlows( int g ) {
printf( "Hello from thisBlows! i: %d, this ptr: %p\n", g,Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.comtag:blogger.com,1999:blog-3330363568531008511.post-6689362697737783802007-03-21T11:34:00.000-07:002007-03-21T11:55:11.162-07:00Welcome to my madness!So in a fit of madness I have finally succumbed to vomiting out my thoughts and casting them upon that limitless sea of inequity also know as "da Interknet"*. In the hopes that someone will find this useful (yes I realize that's doubtful, but bear with me, OK), I'll actually try and confine my remarks to the trials and tribulations of designing and implementing a cross platform C++ framework, as Jim Craftonhttp://www.blogger.com/profile/06342609230425703376noreply@blogger.com