Read More...
[Source: Stuart Jones Weblog - Posted by Kishore Vengala]

This is a blog where you can find some latest or unknown tricks related to computers , programming languages , hardware , scripts , operating system and many more.
I have posted the materials from my Advanced Ajax presentation at code camp on the Berwick Heights Software website. The zip archive includes the source code for all of the Ajax examples that I presented on Saturday.
Thanks to all those who attended for making this an interesting day. I hope that you found the topics throughout the day useful. As I mentioned in my first talk, the various user groups that meet throughout New England present these kinds of talks on a monthly basis. The International .Net Association (INETA) website has a page that will give you all the details. Choose USA in the first select box and then choose the state in which you're interested to find out which user groups meet near you, when they meet and whom to contact.
I look forward to seeing you all at a future presentation.
I updated some of my custom types for Enterprise Library today from version 1.1 to 2.0. I have a custom logging formatter that takes log entries and formats them as XML. I ran into a rather nasty error message when the formatter was auto-constructed with the new 2.0 Enterprise Library. Although I had followed it rather closely, the Enterprise Library 2.0 documentation does not state that the constructor for the custom formatter must include a paramter of type NameValueCollection since that will hold the configuration data for the formatter. This is true, of course, regardless of whether or not you are using the configuration data. So, the custom formatter should look like:
[ConfigurationElementType(typeof(CustomFormatterData))]Make sure you add the ConfigurationElementType attribute to your custom formatter class since it is also required by the Enterprise Library object builder.
I'll be speaking once again on Ajax at the Maine Bytes User Group next Thursday, December 14, 6:00pm. The group meets at UnumProvident's Home Office 3 building at 2211 Congress Street in Portland, Maine.
I was using the drag-n-drop feature of the Rico Ajax library the other day and noticed that the feature was not working in Internet Explorer, where I was getting this error:
Microsoft JScript runtime error: 'document.defaultView' is null or not an object
In Firefox, I was seeing this error in the Javascript console:
Error: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://localhost/Ajax/AjaxJSLibs/rico.js :: anonymous :: line 2644" data: no]
Source File: http://localhost/Ajax/AjaxJSLibs/rico.js
Line: 2644
Upon closer inspection, I noticed that the problem was buried deep inside of a Rico utility function that was using introspection to set HTML element properties. I realized that it was trying to work with the background-color style for the element, but this was not set in my CSS for the element, so it was referencing a null value. The fix was to make sure that the elements that are set up as the Rico draggables and dropzones have the CSS background-color property set.
This makes sense, once I realized what was going on. The background color changes for both the dragged item and the drop zones while the item is dragged. The Rico library needs to save the original background color so that it can be reset once the dragging is done.
So, when using the Rico drag-n-drop feature, make sure you set the background-color style for the draggable and dropzone HTML elements.
I found out at Code Camp 6 last weekend, and now it is official, that Chris Bowen is the new Microsoft Developer Evangelist for New England. I want to heartily welcome Chris to his new role and wish him continued success. I'm looking forward to working with him. Chris is replacing Thom Robbins, who is now Director for .NET Platform Marketing in Redmond.
I'll be speaking on Ajax at the Rhode Island .Net User Group next Wednesday, February 7, 6:00pm. The group meets at Roger Williams University in Bristol, Rhode Island.