Skip to content

Moving from ASP.NET 1.1 to 2.0

Link Drop VI

  • UltraVNC SC – a VNC ‘server’ you can package up and send to friend. When launched UltraVNC SC makes the outbound connection back to your waiting VNC client. No need to set-up any firewall rules on the ‘controlled’ PC.
  • Thoof – always has a few articles I find interesting. Uses your stats (articles clicked, your browser make/version, geographic location) to find articles tailored for you.
  • Imperial History of the Middle East – found this on Thoof.
  • Synergy – control several PCs from one mouse/keyboard, moving the mouse off one screen seamlessly flows onto the next screen.
  • 2005 BT Technology Timeline [warning PDF link]
  • Slow Wave – people send in their dreams for some pretty weird cartoons

Silverlight createFromXaml Bug

Odd Silverlight bug when calling ‘createFromXaml’ – here’s the error for the search engines:

Firefox: Error calling method on NPObject!
Internet Explorer: Error: AG_E_RUNTIME_METHOD : CreateFromXAML

The error occurred when I was trying pull apart the Video Library Sample for my own project.

The cause of the bug comes down to this:

  • Using the replaceAll prototype to get a string which is passed to createFromXaml:
  • works fine when it finds the placeholder and replaces it
  • crashes when it doesn’t find the placeholder in the string.

Have a look at an example: Silverlight createFromXaml bug. I’m writing out the string I’m using with createFromXaml in the textarea. The first button uses the untouched template, the second replaces the $2 placeholder, and the third attempts to replace a non-existent $3 placeholder.

Stripping all the functionality out of replaceAll causes the error to happen everytime – suggesting Silverlight has a problem dealing with an untouched ‘this’ coming from a prototype method on a string.

String.prototype.replaceAll = function(strTarget, strSubString) {
    var strText = this;
    return( strText );
}

I’ve created a post about it in the Silverlight forums: BUG: createFromXaml and prototypes.

C# command line parser?

Sat down to start a little command-line app on the weekend – anyone know of a good library to parse command line arguments? Expecting something with a simple api to set up a list of arguments, specific mandatory ones, and enforce some validation (types and ranges?).

Quick Google search came up with:

Expect an update (and the finished project) soon! 🙂