<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Dan Rigby &#187; Tips and Tricks</title> <atom:link href="http://danrigby.com/category/tips/feed/" rel="self" type="application/rss+xml" /><link>http://danrigby.com</link> <description>Random thoughts about Life, Technology, and Software</description> <lastBuildDate>Sat, 14 Jan 2012 19:22:00 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>INotifyPropertyChanged, the Anders Hejlsberg Way</title><link>http://danrigby.com/2012/01/08/inotifypropertychanged-the-anders-hejlsberg-way/</link> <comments>http://danrigby.com/2012/01/08/inotifypropertychanged-the-anders-hejlsberg-way/#comments</comments> <pubDate>Sun, 08 Jan 2012 22:46:17 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[Code]]></category> <category><![CDATA[INotifyPropertyChanged]]></category><guid
isPermaLink="false">http://danrigby.com/?p=452</guid> <description><![CDATA[Back in September I was watching the Build session that Anders Hejlsberg was giving on the Future directions for C# and Visual Basic and something small but interesting stood out to me in the demo code he used. We&#8217;re all pretty used to the standard boilerplate implementation of INotifyPropertyChanged that goes like this: public event PropertyChangedEventHandler PropertyChanged; &#160; [...]]]></description> <content:encoded><![CDATA[<p>Back in September I was watching the <a
href="http://www.buildwindows.com/" target="_blank">Build</a> session that <a
href="http://en.wikipedia.org/wiki/Anders_Hejlsberg" target="_blank">Anders Hejlsberg</a> was giving on the <a
href="http://channel9.msdn.com/events/BUILD/BUILD2011/TOOL-816T" target="_blank">Future directions for C# and Visual Basic</a> and something small but interesting stood out to me in the demo code he used.</p><p>We&#8217;re all pretty used to the standard boilerplate implementation of <span
style="font-family: 'courier new', courier;"><a
href="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx" target="_blank">INotifyPropertyChanged</a></span> that goes like this:</p><div
class="wp_codebox"><table><tr
id="p4523"><td
class="code" id="p452code3"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">event</span> PropertyChangedEventHandler PropertyChanged<span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> NotifyPropertyChanged<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">String</span> info<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>PropertyChanged <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        PropertyChanged<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span>, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> PropertyChangedEventArgs<span style="color: #008000;">&#40;</span>info<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">string</span> companyNameValue <span style="color: #008000;">=</span> <span style="color: #6666cc; font-weight: bold;">String</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> CompanyName
<span style="color: #008000;">&#123;</span>
    get <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">return</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">companyNameValue</span><span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    set
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>value <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">companyNameValue</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">companyNameValue</span> <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
            NotifyPropertyChanged<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;CompanyName&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div><p>The above code is taken directly from the MSDN article on &#8220;<a
href="http://msdn.microsoft.com/en-us/library/ms229614.aspx" target="_blank">How to: Implement the INotifyPropertyChanged Interface</a>&#8220;. What jumped out at me in Anders code, was that he was doing the check for equality in the helper method and not the property itself. The thought of doing this had crossed my mind before, but how could you create a method that could check for equality <em>for any given type</em>?</p><p>Enter the<span
style="font-family: 'courier new', courier;"> <a
href="http://msdn.microsoft.com/en-us/library/ms224763.aspx" target="_blank">EqualityComparer&lt;T&gt;.Default</a></span> property.</p><p>Using the <span
style="font-family: 'courier new', courier;"><a
href="http://msdn.microsoft.com/en-us/library/ms132128.aspx" target="_blank">Equals()</a></span> method on <span
style="font-family: 'courier new', courier;">EqualityComparer&lt;T&gt;.Default</span> we can now create a generic method that compares the equality of two instances of any give type. This gives rise to the following <span
style="font-family: 'courier new', courier;">INotifyPropertyChanged</span> implementation that Anders used in his session:</p><div
class="wp_codebox"><table><tr
id="p4524"><td
class="code" id="p452code4"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">event</span> PropertyChangedEventHandler PropertyChanged<span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetProperty<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">ref</span> T field, T value, <span style="color: #6666cc; font-weight: bold;">string</span> name<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>EqualityComparer<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;.</span><span style="color: #0600FF; font-weight: bold;">Default</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Equals</span><span style="color: #008000;">&#40;</span>field, value<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        field <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span>
        var handler <span style="color: #008000;">=</span> PropertyChanged<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>handler <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
          handler<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span>, <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> PropertyChangedEventArgs<span style="color: #008000;">&#40;</span>name<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">int</span> unitsInStock<span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">int</span> UnitsInStock
<span style="color: #008000;">&#123;</span>
    get <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">return</span> unitsInStock<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
    set 
    <span style="color: #008000;">&#123;</span> 
        SetProperty<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">ref</span> unitsInStock, value, <span style="color: #666666;">&quot;UnitsInStock&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div><p>This not only reduces the property set implementation down to 1 line in most cases, but sets up a <a
href="http://www.codinghorror.com/blog/2007/08/falling-into-the-pit-of-success.html" target="_blank">Pit of Success</a> for properly implementing <span
style="font-family: 'courier new', courier;">INotifyPropertyChanged</span> in a class/subclass&#8217;s properties.</p><p>Nice.</p><p>(Bonus points for anyone who realized the current MSDN example code isn&#8217;t thread safe and contains a <a
href="http://blogs.msdn.com/b/ericlippert/archive/2009/04/29/events-and-races.aspx" target="_blank">Race Condition</a>.)</p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2012/01/08/inotifypropertychanged-the-anders-hejlsberg-way/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Quick and Easy Google (or Bing) Web Search in Visual Studio</title><link>http://danrigby.com/2010/03/03/quick-and-easy-google-or-bing-web-search-in-visual-studio/</link> <comments>http://danrigby.com/2010/03/03/quick-and-easy-google-or-bing-web-search-in-visual-studio/#comments</comments> <pubDate>Thu, 04 Mar 2010 02:48:38 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[Google]]></category> <category><![CDATA[VisualStudio]]></category><guid
isPermaLink="false">http://danrigby.com/?p=277</guid> <description><![CDATA[Here is a quick and easy way to add a Google (or Bing) Web Search link to the context menu in Visual Studio: - Open the Visual Studio macros IDE by navigating to Tools –&#62; Macros –&#62; Macros IDE (or pressing Alt+F11). - Right click on “MyMacros” and select Add New –&#62; Add New Item. - Select [...]]]></description> <content:encoded><![CDATA[<p><strong>Here is a quick and easy way to add a Google (or Bing) Web Search link to the context menu in Visual Studio:</strong></p><p>- Open the Visual Studio macros IDE by navigating to Tools –&gt; Macros –&gt; Macros IDE (or pressing Alt+F11).</p><p>- Right click on “MyMacros” and select Add New –&gt; Add New Item.</p><p>- Select the Module template, name the module “Search”, and click Add.</p><p>- Paste the following code directly before the “End Module” line:</p><div
class="wp_codebox"><table><tr
id="p2776"><td
class="code" id="p277code6"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Sub</span> Search()
    <span style="color: #000080;">Dim</span> strUrl <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>
    <span style="color: #000080;">Dim</span> selection <span style="color: #000080;">As</span> TextSelection = DTE.ActiveDocument.Selection()
    <span style="color: #000080;">If</span> selection.Text &lt;&gt; <span style="color: #800000;">&quot;&quot;</span> <span style="color: #000080;">Then</span>
        strUrl = <span style="color: #800000;">&quot;www.google.com/search?q=&quot;</span> + selection.Text
        <span style="color: #008000;">' strUrl = &quot;www.bing.com/search?q=&quot; + selection.Text
</span>        DTE.ExecuteCommand(<span style="color: #800000;">&quot;View.URL&quot;</span>, strUrl)
    <span style="color: #000080;">Else</span>
        MsgBox(<span style="color: #800000;">&quot;Select Text first to Search&quot;</span>)
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span></pre></td></tr></table></div><p>- (Optional) If you prefer to use Bing for your search, uncomment the Bing line and comment out the Google line.</p><p>- Your macro editor window should now look something like this:</p><p><a
href="http://danrigby.com/wp-content/uploads/2010/03/image.jpg?9d7bd4"><img
class="alignnone size-full wp-image-421" title="VsSearch1" src="http://danrigby.com/wp-content/uploads/2010/03/image.jpg?9d7bd4" alt="" width="640" height="480" /></a></p><p>- Save and close the Macro Editor window and IDE.</p><p>- Right click on the Visual Studio toolbar and select Customize.</p><p>- Under the Toolbars tab, check the Context Menus option and the switch to the Commands tab.</p><p>- Select the Macros Category, and then select the “MyMacros.Search.Search” macro.</p><p>- Drag the selected macro onto “Editor Context Menus” -&gt; “Code Window” and then drop it where you want it in the context menu (I place mine below the Paste command).</p><p>- Right click on the new context menu item and change it’s name to “&amp;Web Search”.</p><p>- Click close on the Customize window.</p><p>- You are now done! If everything has gone according to plan, when viewing a source code file you should now see a new context menu item that will do a web search on any selected text when you click it:</p><p><a
href="http://danrigby.com/wp-content/uploads/2010/03/image1.jpg?9d7bd4"><img
class="alignnone size-full wp-image-422" title="VsSearch2" src="http://danrigby.com/wp-content/uploads/2010/03/image1.jpg?9d7bd4" alt="" width="640" height="480" /></a></p><p><a
href="http://danrigby.com/wp-content/uploads/2010/03/image2.jpg?9d7bd4"><img
class="alignnone size-full wp-image-423" title="VsSearch3" src="http://danrigby.com/wp-content/uploads/2010/03/image2.jpg?9d7bd4" alt="" width="640" height="480" /></a></p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2010/03/03/quick-and-easy-google-or-bing-web-search-in-visual-studio/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Automatically Cancelling a Failed Build in Visual Studio</title><link>http://danrigby.com/2009/10/04/automatically-cancelling-a-failed-build-in-visual-studio/</link> <comments>http://danrigby.com/2009/10/04/automatically-cancelling-a-failed-build-in-visual-studio/#comments</comments> <pubDate>Mon, 05 Oct 2009 01:43:19 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[VisualStudio]]></category><guid
isPermaLink="false">http://danrigby.com/?p=238</guid> <description><![CDATA[Stumbled across this little tip on how to automatically cancel a build in progress after getting an error. You normally have to wait for visual studio to try to finish building all of the remaining projects before getting a chance to fix an the issue and this can take a few minutes if you have [...]]]></description> <content:encoded><![CDATA[<p>Stumbled across <a
href="http://www.ehow.com/how_5025041_automatically-visual-studio-build-error.html" target="_blank">this little tip</a> on how to automatically cancel a build in progress after getting an error. You normally have to wait for visual studio to try to finish building all of the remaining projects before getting a chance to fix an the issue and this can take a few minutes if you have a lot of projects in your solution.</p><p><strong>Step 1:</strong> Open the Visual Studio macros IDE by navigating to Tools –&gt; Macros –&gt; Macros IDE.</p><p><strong>Step 2:</strong> Double click on “MyMacros” and then on “EnvironmentEvents”. You should now be looking at a VB code editor window.</p><p><strong>Step 3:</strong> Paste the following code directly before the “End Module” line:</p><div
class="wp_codebox"><table><tr
id="p2388"><td
class="code" id="p238code8"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> BuildEvents_OnBuildProjConfigDone(<span style="color: #000080;">ByVal</span> Project <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>, <span style="color: #000080;">ByVal</span> ProjectConfig <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>, <span style="color: #000080;">ByVal</span> Platform <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>, <span style="color: #000080;">ByVal</span> SolutionConfig <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>, <span style="color: #000080;">ByVal</span> Success <span style="color: #000080;">As</span> <span style="color: #000080;">Boolean</span>) Handles BuildEvents.OnBuildProjConfigDone
&nbsp;
    <span style="color: #000080;">If</span> Success = <span style="color: #000080;">False</span> <span style="color: #000080;">Then</span>
        DTE.ExecuteCommand(<span style="color: #800000;">&quot;Build.Cancel&quot;</span>)
    <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
&nbsp;
<span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span></pre></td></tr></table></div><p><strong>Step 4: </strong>Save and close the Macro Editor window and IDE.</p><p>All done!</p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2009/10/04/automatically-cancelling-a-failed-build-in-visual-studio/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Retroactive Browser Compatibility</title><link>http://danrigby.com/2009/04/19/retroactive-browser-compatibility/</link> <comments>http://danrigby.com/2009/04/19/retroactive-browser-compatibility/#comments</comments> <pubDate>Sun, 19 Apr 2009 22:45:03 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Software Development]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[Compatibility]]></category> <category><![CDATA[Javascript]]></category><guid
isPermaLink="false">http://danrigby.com/2009/04/19/retroactive-browser-compatibility/</guid> <description><![CDATA[When working on an existing web application you may be placed in a situation where you need to support new browsers, or just other browsers that your app wasn’t originally coded for or tested in. In my case, this took the form of a web app developed exclusively for Internet Explorer that now needed to [...]]]></description> <content:encoded><![CDATA[<p>When working on an existing web application you may be placed in a situation where you need to support new browsers, or just other browsers that your app wasn’t originally coded for or tested in. In my case, this took the form of a web app developed exclusively for Internet Explorer that now needed to support other browsers. As I went through and corrected many of the browser incompatibilities, I noticed a few common ones, and wanted to mention them in case it’s beneficial to others in the same situation.</p><p>I should mention up front that jQuery was an indispensible tool when I was working on this project as in many cases I was able to replace the offending JavaScript with a jQuery equivalent that was cross browser compatible. If you’re a web developer and are not familiar with <a
href="http://www.jquery.com" target="_blank">jQuery</a>, you probably should be. <img
src="http://danrigby.com/wp-includes/images/smilies/icon_wink.gif?9d7bd4" alt=';-)' class='wp-smiley' /></p><p>So a couple of things to look out for… I wanted to list the easiest ones to spot first as you can do a text search and usually find all of them:</p><ol><li><strong>CSS Expressions:</strong><ul><li>Were implemented in IE5 and allow you to assign a JavaScript expression to a CSS property.</li><li>Were deprecated in IE8 standards mode, see <a
href="http://blogs.msdn.com/ie/archive/2008/10/16/ending-expressions.aspx" target="_blank">http://blogs.msdn.com/ie/archive/2008/10/16/ending-expressions.aspx</a> for details.</li><li>IE specific.</li><li>Search for: “expression(”</li><li>Replace with JavaScript that dynamically modifies the CSS properties in response to specific browser events (onresize, etc).<ul><li>In many cases this can be more performant than CSS expressions because you can choose to bind to specific events (CSS expressions are reevaluated *every* time a JavaScript event with at least 1 listener fires.</li></ul></li></ul></li><li><strong>outerHTML:</strong><ul><li>“Get or set the HTML of the entire node x, including the outermost tag (element x itself).”</li><li>Example: x.outerHTML = &#8220;Let&#8217;s &lt;u&gt;change&lt;/u&gt; it!&#8221;</li><li>IE specific.</li><li>Search for: “outerHTML”</li><li>Replace with innerHTML or W3C DOM methods. innerHTML is in theory faster, but IE and Konquerer have some issues when innerHTML is used with tables. Replacing outerHTML with calls to innerHTML will also require some changes to the logic using outerHTML as innerHTML is slightly different in behavior.</li></ul></li><li><strong>Visual Filters:</strong><ul><li>Used commonly to create gradients without using images.</li><li>More information on Visual Filters: <a
href="http://msdn.microsoft.com/en-us/library/ms532853.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms532853.aspx</a></li><li>IE specific.</li><li>Example: &lt;ELEMENT STYLE=&#8221;filter:progid:DXImageTransform.Microsoft.Gradient(sProperties)&#8221; &#8230; &gt;</li><li>Search for: “DXImageTransform”</li><li>Replace with… Unfortunately there really isn’t an equivalent for this. Some of the visual filters can be replicated using standard CSS properties, but not all of them. As convenient as the visual filters are, they will only work in internet explorer at the moment.</li></ul></li><li><strong>Window.Event:</strong><ul><li>Used to access JavaScript event information in IE.</li><li>IE Specific.</li><li>Search for: “window.event”</li><li>This item could have several pages written about it, but the short story is that IE handles passing JavaScript event information differently than other browsers. You will need to code your JavaScript to accommodate this difference. jQuery can again be useful here as it can abstract a lot of this problem away from you. I recommend reading the section on events here: <a
href="http://www.reloco.com.ar/mozilla/compat.html" target="_blank">http://www.reloco.com.ar/mozilla/compat.html</a> as it will give you an overview of the problem and how to address it.</li></ul></li><li><strong>Custom Attributes:</strong><ul><li>Used to defined custom element attributes.</li><li>Getting or setting custom attributes without using DOM methods is not cross browser compatible.<ul><li>Example: element.MyProp = “This doesn’t work in all browsers.”</li></ul></li><li>Search for… No good search string for these. You just need to keep your eyes out for JavaScript that makes calls to custom attributes without using DOM methods (or jQuery).</li><li>Replace with: calls to .getAttribute(“MyProp”) or setAttribute(“MyProp”) or if using jQuery, element.attr() as shown here: <a
href="http://docs.jquery.com/Attributes/attr" target="_blank">http://docs.jquery.com/Attributes/attr</a>.</li></ul></li></ol><p>This list is by no means exhaustive, but I wanted to point out many of the common issues I have come across. Your mileage may vary. I recommend checking out the references listed below for a lot more good compatibility information. I’ve tried to check all of my facts, but if you notice anything that seems off, let me know so I can fix it!</p><p><strong>References:</strong></p><ul><li><a
href="http://www.reloco.com.ar/mozilla/compat.html" target="_blank">http://www.reloco.com.ar/mozilla/compat.html</a> – “Making your web browser compatible with Firefox”<ul><li>A good overview of many of the common browser compatibility problems faced when making an web app written for IE work in Firefox</li></ul></li><li><a
href="http://www.quirksmode.org/compatibility.html" target="_blank">http://www.quirksmode.org/compatibility.html</a> – “Compatibility Master Table”<ul><li>The holy grail of browser compatibility information. Seriously… Want to know if a browser fully supports CSS2, CSS3, DOM, etc? It’s here.</li></ul></li><li><a
title="http://reference.sitepoint.com/" href="http://reference.sitepoint.com/" target="_blank">http://reference.sitepoint.com/</a> – “CSS/HTML/JavaScript Reference”<ul><li>Reference site for CSS, HTML, and JavaScript information. Its got a clean layout and additionally contains browser compatibility information for each of the items.</li></ul></li><li><a
href="http://blogs.msdn.com/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx" target="_blank">http://blogs.msdn.com/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx</a> – “Site Compatibility and IE8”<ul><li>A page detailing potential issues and fixes for making your pages compatible with IE8 in Standards Mode. This is actually a good reference for potential cross browser problems as most of the items listed are cross browser compatibility issues as well.</li></ul></li></ul> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2009/04/19/retroactive-browser-compatibility/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Making ReSharper Play Nice With StyleCop</title><link>http://danrigby.com/2009/01/23/making-resharper-play-nice-with-stylecop/</link> <comments>http://danrigby.com/2009/01/23/making-resharper-play-nice-with-stylecop/#comments</comments> <pubDate>Fri, 23 Jan 2009 17:10:19 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[ReSharper]]></category><guid
isPermaLink="false">http://danrigby.com/?p=186</guid> <description><![CDATA[I&#8217;ve been toying with StyleCop more and more as of late and ran into some situations where ReSharper and StyleCop were fighting each other over code formatting issues. Some manual tweaking reduced the problems, but it got me curious. So I did some research and uncovered a wonderful tool, StyleCop for ReSharper. StyleCop for ReSharper [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been toying with StyleCop more and more as of late and ran into some situations where ReSharper and StyleCop were fighting each other over code formatting issues. Some manual tweaking reduced the problems, but it got me curious. So I did some research and uncovered a wonderful tool, <strong><a
href="http://www.codeplex.com/StyleCopForReSharper" target="_blank">StyleCop for ReSharper</a></strong>.</p><blockquote><p>StyleCop for ReSharper is a ReSharper 4.1 plug-in that allows Microsoft StyleCop to be run as you type, generating real-time syntax highlighting of violations. StyleCop for ReSharper also contains a collection of Quick-Fixes and Code Clean-Up Modules to help you easily fix StyleCop code styling violations.</p></blockquote><p>StyleCop for ReSharper also comes with a ReSharper Code Style Settings File which you can import into ReSharper to make ReSharper&#8217;s auto formatting features compliant with StyleCop&#8217;s recommendations. If you don&#8217;t want to import a whole code style settings file and would rather just tweak some specific formatting settings that are responsible for most of StyleCop&#8217;s complaints about ReSharper, I recommend reading these 2 blog posts at <a
href="http://www.hockblogs.net/" target="_blank">Hock Blogs</a>:</p><ul><li><a
href="http://www.hockblogs.net/post/2008/10/4-great-Resharper-tips-for-use-with-StyleCop!.aspx" target="_blank">http://www.hockblogs.net/post/2008/10/4-great-Resharper-tips-for-use-with-StyleCop!.aspx</a></li><li><a
href="http://www.hockblogs.net/post/2008/11/Another-set-of-great-Resharper-tips-for-use-with-StyleCop!.aspx" target="_blank">http://www.hockblogs.net/post/2008/11/Another-set-of-great-Resharper-tips-for-use-with-StyleCop!.aspx</a></li></ul><p>Navigating around the <a
href="http://www.codeplex.com/StyleCopForReSharper" target="_blank">StyleCop</a><a
href="http://www.codeplex.com/StyleCopForReSharper" target="_blank"> for </a><a
href="http://www.codeplex.com/StyleCopForReSharper" target="_blank">ReSharper</a><a
href="http://www.codeplex.com/StyleCopForReSharper" target="_blank"> project page</a> on CodePlex also turns up a lot of additional useful information:</p><ul><li><a
href="http://www.codeplex.com/StyleCopForReSharper/Wiki/View.aspx?title=Fixes&amp;referringTitle=Home" target="_blank">List of all the fixes currently in StyleCop for Resharper</a></li><li><a
href="http://www.codeplex.com/StyleCopForReSharper/Wiki/View.aspx?title=ConfiguringStyleCopFriendlyCodeCleanUpSettings&amp;referringTitle=Home" target="_blank">Configuring StyleCop Friendly Code Clean-Up Settings</a></li><li><a
href="http://www.codeplex.com/StyleCopForReSharper/Wiki/View.aspx?title=Contributing&amp;referringTitle=Home" target="_blank">Configuring a Company Name for StyleCop File Header</a></li><li><a
href="http://www.codeplex.com/StyleCopForReSharper/Wiki/View.aspx?title=ConfigureInspectionSeverity&amp;referringTitle=Home" target="_blank">Configuring Inspection Severity for StyleCop Warnings</a></li></ul><p>All in all, I&#8217;m enjoying this ReSharper plug-in. It has taken a lot of the pain out of being compliant with StyleCop&#8217;s rules.</p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2009/01/23/making-resharper-play-nice-with-stylecop/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Unofficial JQuery 1.3 Visual Studio Intellisense File</title><link>http://danrigby.com/2009/01/17/unofficial-jquery-13-visual-studio-intellisense-file/</link> <comments>http://danrigby.com/2009/01/17/unofficial-jquery-13-visual-studio-intellisense-file/#comments</comments> <pubDate>Sun, 18 Jan 2009 03:02:09 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[News]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[VisualStudio]]></category><guid
isPermaLink="false">http://danrigby.com/?p=155</guid> <description><![CDATA[In lieu of the official Visual Studio 2008 Intellisense file for jQuery, the jQuery intellisense file generator at http://www.infobasis.com/sandpit/jQuery-Intellisense/ has been updated to support jQuery 1.3.0 (See this post for more details). The will allow you to get proper jQuery 1.3 intellisense in your applications until the official version is released. The above linked script generator uses [...]]]></description> <content:encoded><![CDATA[<p>In lieu of the official Visual Studio 2008 Intellisense file for jQuery, the jQuery intellisense file generator at <a
href="http://www.infobasis.com/sandpit/jQuery-Intellisense/" target="_blank">http://www.infobasis.com/sandpit/jQuery-Intellisense/</a> has been updated to support jQuery 1.3.0 (See <a
href="http://blogs.ipona.com/james/archive/2009/01/14/jquery-1.3-and-visual-studio-2008-intellisense.aspx" target="_blank">this post</a> for more details). The will allow you to get proper jQuery 1.3 intellisense in your applications until the official version is released. The above linked script generator uses the official jQuery API documentation to build the intellisense file, so you don&#8217;t need to worry about it being inaccurate or imcomplete just because it&#8217;s not the &#8220;official&#8221; version.</p><p>Happy jQuerying!</p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2009/01/17/unofficial-jquery-13-visual-studio-intellisense-file/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Slide deck for my JaxDug Session</title><link>http://danrigby.com/2008/10/01/slide-deck-for-my-jaxdug-session/</link> <comments>http://danrigby.com/2008/10/01/slide-deck-for-my-jaxdug-session/#comments</comments> <pubDate>Wed, 01 Oct 2008 20:17:52 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Software Development]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[Presentations]]></category><guid
isPermaLink="false">http://www.rigbyonline.net/?p=86</guid> <description><![CDATA[My the slide show for my session today can be downloaded here: Free Developer Tools.pptx It&#8217;s in PowerPoint 2007 format, so if you don&#8217;t have PowerPoint 2007 installed, you can download the viewer here: http://www.microsoft.com/downloads/details.aspx?familyid=048dc840-14e1-467d-8dca-19d2a8fd7485&#38;displaylang=en Thanks to all who attended!]]></description> <content:encoded><![CDATA[<p>My the slide show for my session today can be downloaded here:</p><p><a
href="http://danrigby.com/wp-content/uploads/2008/10/free-developer-tools.pptx?9d7bd4">Free Developer Tools.pptx</a></p><p>It&#8217;s in PowerPoint 2007 format, so if you don&#8217;t have PowerPoint 2007 installed, you can download the viewer here:</p><p><a
href="http://www.microsoft.com/downloads/details.aspx?familyid=048dc840-14e1-467d-8dca-19d2a8fd7485&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=048dc840-14e1-467d-8dca-19d2a8fd7485&amp;displaylang=en</a></p><p>Thanks to all who attended!</p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2008/10/01/slide-deck-for-my-jaxdug-session/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Automatic Code Regions, Virtual Earth Controls, and Vista Performance Tweaks, Oh My!</title><link>http://danrigby.com/2008/07/29/automatic-code-regions-virtual-earth-controls-and-vista-performance-tweaks-oh-my/</link> <comments>http://danrigby.com/2008/07/29/automatic-code-regions-virtual-earth-controls-and-vista-performance-tweaks-oh-my/#comments</comments> <pubDate>Wed, 30 Jul 2008 00:36:38 +0000</pubDate> <dc:creator>Dan Rigby</dc:creator> <category><![CDATA[Software Development]]></category> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[OpenSource]]></category><guid
isPermaLink="false">http://www.rigbyonline.net/?p=76</guid> <description><![CDATA[I do like to point out neat things when I come across them, so I&#8217;d like to bring your attention to some useful resources I stumbled across today: Windows Vista Performance and Tuning Guide &#8220;Windows Vista and SP1 focus on delivering greater performance and overall system responsiveness. By striking a balance between speed and responsiveness, [...]]]></description> <content:encoded><![CDATA[<p>I do like to point out neat things when I come across them, so I&#8217;d like to bring your attention to some useful resources I stumbled across today:</p><p><a
href="http://www.microsoft.com/downloads/details.aspx?familyid=ab377598-a637-432c-a3c8-1607ab629201&amp;displaylang=en" target="_blank"><span
style="text-decoration: underline;">Windows Vista Performance and Tuning Guide</span></a><br
/> &#8220;Windows Vista and SP1 focus on delivering greater performance and overall system responsiveness. By striking a balance between speed and responsiveness, Windows Vista and SP1 deliver a level of performance that has the greatest positive impact on the system’s usability.This guide looks at the following areas of performance improvement&#8230;&#8221;</p><p><a
href="http://channel9.msdn.com/posts/Mark+Brown/Virtual-Earth-ASPNET-Control-CTP-Release/" target="_blank"><span
style="text-decoration: underline;">Virtual Earth ASP.NET Control &#8211; CTP Release</span></a><br
/> &#8220;Finally at long last we have released the Virtual Earth ASP.NET control (CTP Release). I spent a few minutes with Angus Logan from the Windows Live Platform Team to show off the control and give a quick demo to get you started. &#8230;&#8221;</p><p><a
href="http://www.rauchy.net/regionerate/2007/06/regionerate-101.html" target="_blank"><span
style="text-decoration: underline;">Regionerate &#8211; Automatic layout enforcement tool for C#</span></a><br
/> &#8220;Regionerate (pronounced ri-jeh-neh-rate) is a new open-source tool for developers and team leaders that allows you to automatically apply layout rules on C# code. &#8230;&#8221;</p><p>Today&#8217;s links courtesy of the <a
href="http://channel9.msdn.com/" target="_blank">Channel 9 Blog</a> and <a
href="http://coolthingoftheday.blogspot.com/" target="_blank">Greg&#8217;s Cool Thing of the Day</a>.</p> ]]></content:encoded> <wfw:commentRss>http://danrigby.com/2008/07/29/automatic-code-regions-virtual-earth-controls-and-vista-performance-tweaks-oh-my/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 720/762 objects using disk: basic

Served from: danrigby.com @ 2012-02-05 13:40:31 -->
