Monday, November 29, 2004

FlexWiki 1.8.1613.0 Now Available

FlexWiki 1.8.1613.0 has been released and is available for immediate download.

This release contains several major enhancements to FlexWiki, the most significant of which (IMO) is improved FireFox compatibility. Other important enhancements include the addition of a "Cancel" button to the edit page, a history list to show the most recently visited topics, improved support for non-ASCII characters, and WikiTalk enhancements.

Thanks to everyone that contributed to this release!

Sunday, November 28, 2004

NAnt 0.85 RC1

Looks like NAnt and NAntContrib have hit 0.85 RC1 status. I've been using an interim build of 0.85 for quite some time now in a production build script, and it's awesome. The support for functions in particular makes a lot of things a lot easier. I'd still like to see iteration over XML nodesets ala XSLT's for-each, but I'm not really complaining.

Check it out if you're still on 0.84.

Saturday, November 20, 2004

Setback in Text Editor Land

We took the baby with us up to Wharton this weekend so my wife could resume her MBA classes. That left me to look after the munchkin, and when she was asleep, alone in the hotel room with nothing pressing begging for my attention. Sweet! Uninterrupted hacking time!

I went back to working on RichTextEditor, which has been my obsession these last few months. My goal for the upcoming release is to add paragraph formatting, including the ability to add shading and borders. Since there are fields called things like wShading and wBorders in the underlying Rich Edit control that RichTextBox is a wrapper for, I thought I'd be able to do it without too much work. Foolish Craig.

The problem is that, although the structures listed in the Platform SDK support the full range of things that can be described in a Rich Text document, the Rich Edit control does not. It stores the values so that you can roundtrip the text with (say) Word, but it doesn't change the way that anything gets displayed. So you can, for example, tell the control to draw borders around a paragraph all you want, but it won't do a damn thing about it.

Now, that's not the real showstopper. I actually thought that might be the case, and came up with a few strategies for working around it. Specifically, what I tried to do was to let the Rich Edit control draw the text, and then draw borders and shading over the top of it with my own GDI+ calls. I even got a prototype working, drawing a shaded rectangle with a border in a fixed location over some text.

Unfortunately, the prototype displayed a problem that would eventually lead me to abandon my efforts: the stuff I was drawing flickered like mad. I spent an evening working through the problem with the ever-generous Ian Griffiths, but in the end we came to the conclusion that the only ways to do what I want involve horrendous hacks on top of nasty grungy bits on top of the hacks I'm already doing. Things like positioning a layered window over top of the RichTextBox window and drawing on that. Blech.

What it comes down to is that the Rich Edit control (and by extension RichTextBox and derivatives) is an 80% solution. Most of the time, you can get it to do what you want. But if you're an exacting bastard like me, and you just can't do without this feature or that, you're in the other 20% and you're screwed.

So, what am I going to do? First, I'll finish up RichTextEditor so that anyone who only needs stuff in the 80% can benefit from it. After all, it gets lots of good features from the underlying Rich Edit control, like sophisticated line breaking and support for East Asian languages. But once I get that out of the way, I'm going to write my own text editor control, from scratch, in managed code.

It's exactly the sort of “reinvent the wheel” scenario that I was hoping to avoid, but I don't think there's any way around it. And I'm looking forward to the experience, too, especially if I can pull it off the way I envision it. My only disappointment is that further development of FlexWikiPad is going to be delayed by however long it takes me to write a stable text editor control. Sigh.

Wednesday, November 10, 2004

Wangdera Controls Version 0.8

I just uploaded a new version of the Wangdera Control Suite, the most significant piece of which is RichTextBox2/RichTextEditor. In addition to fixing a bunch of bugs (some of them pretty significant), I've also added support for a new editing format: Link2. Link2 is a lot like Link, except you can set the underlining and the text color to whatever you like. The built-in Link format mandates blue text with a solid underline. That's a non-starter for an application like FlexWikiPad that needs to indicate whether the destination of the link already exists or not.

This turned out to be a major undertaking. Because of the inherent “it almost doesn't suck” nature of the underlying rich edit control, I found myself in a lengthy spiral of getting it almost working, only to discover that I need to change “just one more thing”. To give you some idea of how far down the spiral went, let me share that I had to completely rewrite the double-click handling of the control by intercepting and processing all WM_LBUTTONCLICK events. Quite a rabbit hole.

But I got it working, and I'm pretty pleased with it. My next steps for the control will be to add support for things like bullets, borders, and shading. The latter two are particularly important for what I want to do with FlexWikiPad. Once I get that done, I'll do a pass through to focus on whatever bugs I know about, then stamp it 1.0. After that, I'll integrate it into FlexWikiPad as part of my complete overhaul of the formatting engine. And if I do that right, I should be able to turn the knob way up on how powerful and customizable FlexWikiPad is. Wish me luck!

Tuesday, November 9, 2004


Things are returning to our new version of “normal” around the hacienda, and the munchkin is doing well. So hopefully I can blog a bit more now.

To that end, I wanted to point out this. Go there and type in your favorite band (Dream Theater for me). Cool, eh? Apparently, it's driven off of Amazon sales data via a web service. I've already found a few new bands that I think I need to investigate.

Monday, November 1, 2004

Election Prediction

I don't usually do political here, but I think this week of all weeks I can be excused.

Like another of my friends, I'll take a crack at predicting the election. Only I think it's going to be Bush. My reasoning for this is somewhat indirect. I'm basing it on the fact that I'm usually too optimistic. I'd really like Kerry to win, and I find myself thinking he could do it. But see, since I think he “could”, that means he's probably trailing in reality. Most polls seem to support that supposition, although margin of error and the electoral system mean that it's all up in the air.

I'd love, love, love to be wrong. I think Kerry will be an indifferent president, will make about the same decisions Bush would in Iraq (we're there to stay, basically), and won't be able to influence the economy that much (presidents get too much blame and too much credit there). Basically, I'm guessing we're looking at another Carter in Kerry. But I want the civil-liberty-supressing, short-sighted adventures we've got running the show right now out. And if nothing else, I want a Democrat to do the nominating of the next set of Supreme Court nominees.

Anyway, hope I'm wrong. To that end, at nearly 33 years of age I voted in this election. That make it my first vote ever (absentee because of the baby).