Permalinks
I’ve added permalinks for all of my articles, as well as commenting for most of the pages within this site (the news pages themselves being one exception). This means that you can now comment on the various coding projects I’ve worked on.
I’ve added permalinks for all of my articles, as well as commenting for most of the pages within this site (the news pages themselves being one exception). This means that you can now comment on the various coding projects I’ve worked on.
I’ve managed to replace the built-in IE control in SharpReader with a nice, fast Mozilla ActiveX control. There’s a few easy steps to follow to get this working:
That’s it- when you start SharpReader, you’ll see a nice Mozilla window instead of IE. To test if it works, right-click the page and select “Properties”. You’ll see a Mozilla-style window like this if everything worked:
Can you tell this application is running Mozilla? :)
Please note that this officially a hack and is not supported by either myself or Luke Hutteman. Have fun!
For those of you writing Visual Studio.NET 2003 add-ins in C# (or any other .NET-enabled language), you might have noticed that CreateToolWindow doesn’t really work with real .NET controls. Fortunately, this piece of code fixes this problem. It’s a bit of hack, but it works for me so far and was created by using Reflector to figure out exactly what was going on.
// Run this code before any CreateToolWindow calls
Type tp = typeof( System.Windows.Forms.Control );
tp = tp.GetNestedType( "ActiveXImpl", BindingFlags.NonPublic );
FieldInfo fi =
tp.GetField( "globalActiveXCount", BindingFlags.Static | BindingFlags.NonPublic );
fi.SetValue( null, Convert.ToInt32( fi.GetValue( null ) ) + 1 );
I’m not sure if Craig Skibo would approve of this work-around, but it’s way easier (and cleaner, IMHO) than using that nasty shim control. If you want to figure out how this works, read my posting to the vsnetaddins Yahoo! group.
In his latest post about RSS, Robert Scoble says:
“Now, imagine a new syndication format that brought up a page that showed what a news aggregator was, and explained how the system worked and why it’s more productive.”
My challenge: create a plug-in XSL file that works with RSS to explain to the user what RSS is and point him at a application to read RSS.
This is actually a fairly easy task. XSL can be plugged into any arbitrary XML file via something called a processing instruction. In the XML file, these appear as tags of the form:
<?some-processing-instruction some-attribute="some-value"?>
There is a special processing instruction that ties an XSL transformation stylesheet to an XML document:
<?xml-stylesheet link="stylesheet.xsl" type="text/xsl"?>
Once the XML file was pointed at an XSL file, the next task was creating a quick-and-dirty XSLT transformation that picks out various bits from the RSS feed itself to create a customized-looking HTML page. You can see my XSLT file here: rss.xsl.
It turns out that my hosting provider isn’t set up out-of-the-box to serve XSLT files with the correct MIME type for Mozilla/Firebird to pick up. It’s likely that a few hosting providers aren’t set up correctly for this. It’s easily fixed, however, by adding a simple .htaccess file to the root of your site:
AddType text/xml .xsl
This .htaccess file sets up the correct XML mime-type mapping for .xsl files, allowing correct operation under Mozilla.
Works well, explains what is available and shows the user what they need to do. I’m sure more features could be added.
I have no idea how you might get this into something like Radio Userland, however.
Mental note: FreeTextBox looks really cool. This would be a great addition to TWiki.