development blog for the wicked stuff we encounter


Installing Chromemailer does NOT mean you've set it up! Please go to Start menu -> Programs -> ChromeMailer and run ChromeMailer.exe!

You can always find the executable under (your install drive, usually C:) Program FilesSkaelede OnlineChromeMailerChromeMailer.exe

People keep asking me, why do they need to use ChromeMailer, how it differs from the good old registry hacks? Here's the technical information: ChromeMailer modifies the default mailto: handler in the registry (HKEY_CLASSES_ROOT || HKEY_CURRENT_USER mailtoshellopencommand), as the good old registry hacks do. If a computer is a stand-alone one, it will use the HKEY_CLASSES_ROOT,if it's in a domain it will use HKEY_CURRENT_USER. (others' settings will not be affected - only if the user is logged in as a Domain Administrator.) The true difference between the other registry-hacks and ChromeMailer is, that it sets the handler to itself, and rewrites the mailto: parameters. A valid mailto: is like: If you pass Gmail URL + mailto: params directly to Chrome (or any other browser) in the registry, with %1 parameter, it will truncate some parts of it, because 2 question marks will be in the URL, and it's not permitted without UrlEncode: so anything after the second will miss. For example: would show up a window with the to address filled, but subject missing. Parameter rewrite is the reason for UAC error on Vista, i don't have $399 to to buy code authentication for my *free* app. So for a user request, in version 0.2 I added the possibility to use this "truncated" mode, so it will not show up any messages, and will work in 80%... :)

I simply can't understand Microsoft, how they can ship Internet Explorer AGAIN with a silly PNG alpha-channel bug. I added a PNG-24 image to the homepage (get in touch button) and IE simply failed to display the border images' Alpha channel, if they are used as background-image from CSS. I thougt it was an IE6 problem only, but no: IE7 still does not know how to handle properly, so I switched back to the good old IE PNG Fix library from TwinHelix to do the work. Update: If you're using IE6 and IE7 on the same machine, IE7 will report itself as IE6 too - so make sure to add the [If IE] clause.

Visual Studio 2008 keeps me entertained all day long:) I have a really complicated project, with several tables and views and stored procedures hooked upon it. I'm using XSD as an intermediate abstraction layer. The error message "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints" kept haunting me for days; I double checked anything:
  • there were no duplicate keys whatsoever
  • there were no NULL values, I experienced with IsNull(..) for fields
  • even empty tables had this error.
Finally, I figured out, that and any changes to the database schema, even the change of the length of any column triggers the above error, the XSD Schema simply does not recieve the changes; even when I click Refresh Schema. The one and only working solution is to open the given XSD file, and simply delete and re-add the errorous object.

Possibly every web developer in his/her lifetime faces with a common DOM error: in IE/Opera the getAttribute() function works as expected for a given item, but in Firefox it misteriously somehow says it's not a function, or the direct reference to the node object's attributes returns undefined value. The problem is, that Firefox's DOM handling generally differs from IE's MSXML DOM method. Basically, in Firefox every node has more nodes as it seems. For example see the following sniplet: <div id="first"><a href="">text</a></div> if you want to query the href attribute of the a node, you'd say: document.getElementById("first").childNodes[0].getAttribute('href') in IE, it works flawlessly, but FF will break completely! Why? Because as it seems, the "a" node is the only child of the div, but in reallity, it is not. Let's face it: we forgot one element: the div text itself, what is currently empty! This will be the first node, and of course it can't have any attributes. To work around this problem, first we should loop through all childs in this simple nodeset as well. In step 2, we need to look up the given childNode's nodeType, if it's a suitable element node: var l = document.getElementById("first"); if (l.hasChildNodes()) { for (i=0;i<l.childNodes.length;i++) { var m = l.childNodes[i]; if (m.nodeType == 1) { var n = m.getAttribute('href'); } }