I’ve missed TActionList and TAction since I started working in .NET. And now I may be able to get them back. Someone posted an article on CodeProject with an ActionList class for WinForms. Woo! I haven’t tried it yet, but if it works well, this could be cool.
Looks like they’re using IExtenderProvider, which I hadn’t thought about for actions but ought to work really well. Looks like a good design; you drop an ActionList on your form, it probably hooks Application.Idle so it can fire the actions’ Update events, and then you just create the actions and set the new Action property that appears on all your controls. I’ll have to see if it’s got everything you really need (caption, imagelist and image index, Visible, etc.). But even if it just gives me an easy way to share the caption, enabled status, and click-handler among several UI elements, that’d be a good start.
Thanks to Chris Woodruff for posting the link.
We’re joining the throngs of people with tax deductions and lawnmowers. Yes, indeed, we just closed on the house. Hooray!
Oddly enough, not only did we not have to bring money to closing, but through one convolution and another, we actually got money back. (Which was good, because we didn’t get the final word on the numbers until half an hour before closing, which wouldn’t have left any time to stop by the bank to get a cashier’s check.) In fact, whenever the wire transfer comes through, we’ll get our entire earnest deposit back! Of course, any money we get back now is money we’ll have to pay back with interest later, but it helps with the little things, like the doors that need replacing, and of course the lawnmower situation. And going out to eat to celebrate (after we get our vacuum, bed, washing machine, and cats moved in). We deserve it. Or will by then, anyway; it’s bleeping humid out there.
But, wow. We have a house. I’m not sure it’s sunk in yet. It’ll probably do that at 2:00 in the morning again.
And now, on to moving. Yecch.
Eric Gunnerson (Program Manager on Microsoft’s C# team) has been blogging about his experiences at JavaOne. Since I’m not a Java programmer, I’ve just been skimming, but I noticed one bit that was extremely interesting:
One of the cool things that JBuilder does is distributed refactorings. This allows you to save a refactoring, ship it with a new version of your product, and then allow your client to apply that refactoring on their code to easily migrate to the new version.
One word: Wow.
Five more words: When can C# have that?? It’d be a fabulous feature for Delphi, too, especially if it was available for both .NET and Win32.
Just imagine if third-party control authors were free to refactor their public interfaces, and get rid of the cruft that invariably creeps in over time. Poorly-named properties, refactorings that move methods onto other classes… and being able to just do the refactoring, ship the new version of your control, and have everyone’s code automatically be brought up to date. Wow…