July 2004 - Posts

Gmail-like Conversation View in Outlook 2003

Well, it's not perfect, but it may be useful to some.

  • Create a new search folder and name it All Mail. Don't specify any criteria, and select the folders you want (should be only inbox and sent items folders. You may also want to uncheck the “include subfolders“ option.)
  • Go to All Mail and wait for it to finish searching (it may take a while, but it's a one-time thing.)
  • Click the Arrange By column and select Conversation.

Gmail does this better, as conversations are grouped even when the subject changes, and it only groups a conversation from one person, whereas Outlook may include a mixture in a single group.

Posted by aelij with no comments
Filed under: ,

Running .Text on ASP.NET 2.0

I finally managed to get .Text working with ASP.NET 2.0. Here's how:

  • Add the following to the httpHandlers section of Web.config:

    <add verb="*" path="*.aspx" type="Dottext.Common.UrlManager.UrlReWriteHandlerFactory,Dottext.Common" />

  • Change the method ProccessHandlerTypePage in the Dottext.Common.UrlManager.UrlReWriteHandlerFactory class. The documentation states that the GetCompiledPageInstance method “supports the .NET Framework infrastructure and is not intended to be used directly from your code.“ Hence, they obviously allowed themselves to change the behavior of this method. The first parameter is supposed to be “the virtual path to the requested file,“ but when you point it to an existing file, that is different from the actual one you want compiled, it processes it instead. I'm not sure this is the right way to do this, though, but it seems to work:

    return PageParser.GetCompiledPageInstance(pagepath.Substring(pagepath.LastIndexOf('\\') + 1), pagepath, context);

  • Additional (nonmandatory) changes I made:
    • Migrating the database to SQL 2005 (Importatnt note: when you use sp_attach_db [no SQL Express Manager yet] to connect the database, it will convert it to a new format, and you will not be able to attach it to a SQL 2000 server anymore. So create a backup prior to attaching.)
    • Changing all the System.Collections classes to their equivalent System.Collections.Generic classes (and removing all unnecessary casts) for better performance.
    • Moving from the code-behind scheme of ASP.NET 1.0/1.1 to partial classes.

I may post the code at the .Text workspace when I get the time to finish it.

Posted by aelij with 3 comment(s)
Filed under: ,

The Hidden C# "Typedef"

I've just seen a blog entry about C# generics, concerning C#'s lack of typedefs. Actually, C# has a way of aliasing classes, using the using directive:

using IntList = System.Collections.Generic.List<int>;

IntList = System.Collections.Generic.List<int>;

Quite simple. This has been there since version 1, but it wasn't quite useful until now.

Creating empty classes as suggested in the above link is a bad idea, in my opinion. You have to maintain them, and it can be awkward for interoperating assemblies (think of two assemblies defining different “alias classes” for the same type.)

Edit: Also see this post at Eric Gunnerson's blog.

Posted by aelij with 7 comment(s)
Filed under: ,

New Gallery Opening

Right here in my blog. It's an Army of Me! And try not to laugh when you see the one with the tiara. ;)
Posted by aelij with no comments
Filed under:

Changed Theme

I've changed the theme for the blog. It used be to based on "Lighty", which was not Firefox friendly. This theme is based on "Marvin2", and seems to be working fine on both browsers.
Posted by aelij with no comments
Filed under:
More Posts