<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>robertwray.co.uk | random ramblings...</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.robertwray.co.uk/blog/atom.xml" />
    <id>tag:www.robertwray.co.uk,2008-01-05:/blog//7</id>
    <updated>2009-12-03T09:39:58Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.23-en</generator>

<entry>
    <title>Outlook 2010 Beta - Still not implemented</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/12/outlook-2010-beta---still-not.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.442</id>

    <published>2009-12-03T09:31:39Z</published>
    <updated>2009-12-03T09:39:58Z</updated>

    <summary>Previously in the saga: Outlook 2010 Beta - &quot;Not Implemented&quot; on Send/Receive.It would appear that problems with Outlook complaining that something is &quot;Not Implemented&quot; are more widespread than I thought when I encountered the issue. Someone on the Technet forums...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
    <category term="outlookoffice2010office2010beta" label="outlook office2010 office2010beta" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[Previously in the saga: <a href="http://www.robertwray.co.uk/blog/2009/11/outlook-2010-beta---not-implem.html">Outlook 2010 Beta - "Not Implemented" on Send/Receive</a>.<br /><br />It would appear that problems with Outlook complaining that something is "Not Implemented" are more widespread than I thought when I encountered the issue. Someone on the Technet forums has <a href="http://social.technet.microsoft.com/Forums/en-US/office2010/thread/fed0d96d-a502-4efb-953e-65e18c37beeb">encountered the "Not Implemented" issue</a>, with what looks like a slightly different set of circumstances, and another person on the Zimbra forums is <a href="http://www.zimbra.com/forums/zimbra-connector-outlook/35018-zco-outlook-2010-beta-problem.html">also encountering the error</a>.<br /><br />I mentioned the issue, along with my solution, over on the the <a href="http://blogs.technet.com/office2010/archive/2009/11/16/announcing-office-2010-beta-availability.aspx#3295033">Office 2010 Engineering blog</a>, but have yet to see anyone else comment there that they've encountered the issue, or any MS bods acknolwedge that it's a known issue. I cross-posted the comment to the <a href="http://blogs.msdn.com/outlook/archive/2009/11/18/announcing-microsoft-office-2010-beta.aspx">Outlook blog</a> so anyone who encounters the problem would stand a better chance of getting to try my solution, but it looks like the comment wasn't released :(<br /><br />I have to say, this is the only bug I've found with Outlook 2010 so far, though!<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>DataTable Key/Value columns to Dictionary</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/11/datatable-keyvalue-columns-to.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.441</id>

    <published>2009-11-19T09:54:12Z</published>
    <updated>2009-11-19T09:55:55Z</updated>

    <summary><![CDATA[There are undoubtedly more elegant ways to do this using LINQ, but to quickly and easily take the key (int) and value (string) columns from a DataTable and turn them into a Dictionary&lt;int, string&gt;, the following method has come in...]]></summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="c" label="c#" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[There are undoubtedly more elegant ways to do this using LINQ, but to quickly and easily take the key (int) and value (string) columns from a DataTable and turn them into a Dictionary&lt;int, string&gt;, the following method has come in handy recently:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public static Dictionary&lt;int, string&gt; GetAsDictionary(DataTable data, string keyField, string valueField)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dictionary&lt;int, string&gt; dictionary = new Dictionary&lt;int, string&gt;();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (DataRow row in data.Rows)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dictionary.Add(Convert.ToInt32(row[keyField]), Convert.ToString(row[valueField]));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return dictionary;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Outlook 2010 Beta - &quot;Not Implemented&quot; on Send/Receive</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/11/outlook-2010-beta---not-implem.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.440</id>

    <published>2009-11-19T09:34:30Z</published>
    <updated>2009-11-19T09:40:29Z</updated>

    <summary>I yesterday installed the Office 2010 beta and almost immediately came across a fairly serious &quot;bug&quot;. It&apos;s debatable whether the bug was caused by Microsoft (i.e. a fault on the part of Office) or by myself, as you&apos;ll see when...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term="Tech" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Testing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="outlookoffice2010office2010beta" label="outlook office2010 office2010beta" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[I yesterday installed the <a href="http://www.microsoft.com/office/2010/en/default.aspx">Office 2010 beta</a> and almost immediately came across a fairly serious "bug". It's debatable whether the bug was caused by Microsoft (i.e. a fault on the part of Office) or by myself, as you'll see when I explain what I did and what the solution is.<br /><br /><b>What I did.</b><br /><br />1 - Installed Office 2010 x86 as a side-by-side install with 2007 (on Windows 7 x86).<br />2 - Ignored the "reboot now" prompt as I needed to open and print a word document<br />3 - Opened the document in Word 2007<br />4 - Waited whilst Office 2007 setup did *something*<br />5 - Printed document and closed word.<br />6 - Rebooted<br />7 - Loaded Outlook 2010<br /><br />This is where my problems began. I received an error message about "Default Programs" over the top of the splash screen, the "backstage" screen was perpetually telling me that my files were being upgraded and that I needed to update the "Connector". Also, when clicking "Send/Receive" I received a "Not Implemented" modal dialog. It's also worth mentioning that Outlook was absent from the Default Programs control panel applet.<br /><br /><b>How I solved it.</b><br /><br />1 - Uninstalled Office 2010<br />2 - Rebooted<br />3 - Re-installed Office 2010<br />4 - Rebooted<br />5 - Loaded Outlook 2010<br /><br />Et Voila, problem solved.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Opera - As delusional as ever..!</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/opera---as-delusional-as-ever.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.436</id>

    <published>2009-06-12T15:00:00Z</published>
    <updated>2009-06-12T15:29:01Z</updated>

    <summary>From: Opera applauds scepticism on MS browser pledge (on The Register).The last paragraph:&quot;For the installed base of IE users, Windows updates and IE updates should come preloaded with other browsers and a ballot screen. The ballot screen with a choice...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Personal" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Tech" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="rant" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="chrome" label="chrome" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="firefox" label="firefox" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ie" label="ie" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="opera" label="opera" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="safari" label="safari" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="windows" label="windows" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[From: <a href="http://www.theregister.co.uk/2009/06/12/eu_opera/">Opera applauds scepticism on MS browser pledge</a> (on The Register).<br /><br />The last paragraph:<br /><blockquote>"For the installed base of IE users, Windows updates and IE updates
should come preloaded with other browsers and a ballot screen. The
ballot screen with a choice of at least five browsers should also be
provided to customers who buy Windows through the retail channel to
upgrade their PCs."<br /></blockquote>Errr, whaaaat!? Internet Explorer, Firefox, Safari, Chrome, Opera. There, that's five browsers named, and the last 3 are marginal (at the moment). The only use I've ever found for Opera as a browser is on my mobile. On the PC it's unintuitive and crap. Yes, crap. I primarily use Firefox, followed by IE. Safari I wouldn't use if I was paid (unless it was a *lot* of money) thanks to the way Apple Update used to (and may still) treat it. All that non-withstanding, surely if Microsoft are going to be required to do this, surely Apple (as the monopoly O/S provider for Mac') should be required to do the same?<br /><br />Not that it'll make the blindest bit of difference though; 99% of home computer users don't know a massive amount about computers, so they'll answer the question "How do I get on the internet?" with "I'll choose the thing called Internet Explorer". Business users will, for the most part, have their access to a browser decided by Corporate IT, who will inevitably choose IE to ensure compatibility with their web-based LOB applications that have been around for a decade and rely on IE6's odd layout behaviours, or other IE proprietary technologies like ActiveX.<br /><br />Yet another wonderful waste of money perpetrated by the EU, thank you very much one and all for dumping money I've paid in taxes down the drain. *Le sigh*<br />]]>
        
    </content>
</entry>

<entry>
    <title>MySql ServerName.Log file size</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/mysql-servernamelog-file-size.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.437</id>

    <published>2009-06-12T07:30:00Z</published>
    <updated>2009-06-12T15:52:17Z</updated>

    <summary>A quick and dirty hack (written in C#) to solve the issue of MySql query log files getting huuuge:System.ServiceProcess.ServiceController sc = new ServiceController(&quot;mysql&quot;, &quot;servername&quot;);sc.Stop();Console.WriteLine(&quot;Stopping&quot;);sc.WaitForStatus(ServiceControllerStatus.Stopped, new TimeSpan(0, 0, 30));Console.WriteLine(&quot;Stopped&quot;);System.IO.File.Delete(@&quot;\\servername\C$\Program Files\MySQL\MySQL Server 5.0\data\ServerName.log&quot;);Console.WriteLine(&quot;Starting&quot;);sc.Start();sc.WaitForStatus(ServiceControllerStatus.Running, new TimeSpan(0, 0, 30));Console.WriteLine(&quot;Started&quot;);I have this compiled into a...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="CruiseControl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MySql" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Nant" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[A quick and dirty hack (written in C#) to solve the issue of <a href="http://stackoverflow.com/questions/919794/mysql-servername-log-file-size">MySql query log files getting huuuge</a>:<br /><br /><blockquote>System.ServiceProcess.ServiceController sc = new ServiceController("mysql", "servername");<br />sc.Stop();<br />Console.WriteLine("Stopping");<br />sc.WaitForStatus(ServiceControllerStatus.Stopped, new TimeSpan(0, 0, 30));<br />Console.WriteLine("Stopped");<br />System.IO.File.Delete(@"\\servername\C$\Program Files\MySQL\MySQL Server 5.0\data\ServerName.log");<br />Console.WriteLine("Starting");<br />sc.Start();<br />sc.WaitForStatus(ServiceControllerStatus.Running, new TimeSpan(0, 0, 30));<br />Console.WriteLine("Started");<br /></blockquote>I have this compiled into a CruiseControl task that runs at 7am every day, no more massive log files and a lot easier than trying to decipher the MySql documentation. Plus, I've got some other odds and ends of maintenance that I've shoe-horned in. Not necessarily elegant, but it works!<br />]]>
        
    </content>
</entry>

<entry>
    <title>Why &quot;int foo = 0;&quot; is pointless in variable declarations</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/why-int-foo-0-is-pointless-in.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.438</id>

    <published>2009-06-11T19:30:00Z</published>
    <updated>2009-06-12T16:19:47Z</updated>

    <summary>From: What does the optimize switch do?Part of the way down:* We omit generating code for things like int foo = 0; because we know that the memory allocator will initialize fields to default values.The key there is that &quot;the...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="c" label="c#" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[From: <a href="http://blogs.msdn.com/ericlippert/archive/2009/06/11/what-does-the-optimize-switch-do.aspx">What does the optimize switch do?</a><br /><br />Part of the way down:<br /><br /><blockquote>* We omit generating code for things like <span class="code">int foo = 0;</span> because we know that the memory allocator will initialize fields to default values.<br /></blockquote>The key there is that "the memory allocator will initialize fields to default values" ... see, there's really no point in setting fields to their default values, it's just code clutter. The compiler throws it away, and even if it didn't, the memory allocator would make it entirely pointless!<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Coolite - File Upload Dialog &amp; other breaking changes</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/coolite---file-upload-dialog-o.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.435</id>

    <published>2009-06-11T07:30:00Z</published>
    <updated>2009-06-11T12:53:55Z</updated>

    <summary>I think I&apos;ve mentioned the custom File Upload Dialog for Coolite previously which sadly doesn&apos;t seem to work with Coolite v0.8 due to a breaking change that&apos;s not mentioned in the Version 0.8.0 -BREAKING CHANGES forum post. In summary, the...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term="Javascript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="asp.net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="coolite" label="coolite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="extjs" label="extjs" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[I think I've mentioned the custom <a href="http://www.coolite.com/forums/Topic2735-19-3.aspx#bm8229">File Upload Dialog</a> for Coolite previously which sadly doesn't seem to work with Coolite v0.8 due to a breaking change that's not mentioned in the <a href="http://www.coolite.com/forums/Topic11993-12-1.aspx">Version 0.8.0 -BREAKING CHANGES</a> forum post. In summary, the ParameterCollection object no longer has a "ToJsonObject" method, but this has been replaced/renamed with "ToJson". Changing the source for the file upload dialog and re-compiling resolves this.<br /><br />I also found that, as mentioned in <a href="http://coolite.com/forums/Topic14894-4-1.aspx">ScriptContainer location not honoured in 0.8 against 0.7</a>, the behaviour of the Coolite ScriptContainer has changed as it now seems to have been split-out into the ScriptContainer and StyleContainer controls. Easily solved, but no less annoying that I had to spend time doing so.<br />]]>
        
    </content>
</entry>

<entry>
    <title>extJs: Combobox .getValue oddity - 2 (The &quot;Solution&quot;)</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/extjs-combobox-getvalue-oddity-1.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.434</id>

    <published>2009-06-08T07:30:00Z</published>
    <updated>2009-06-11T10:14:28Z</updated>

    <summary><![CDATA[Previously: extJs: Combobox .getValue oddityHere's a quick-hacky solution (a better one would be to ensure your combobox's are selection-only):Ext.override(Ext.form.ComboBox, {&nbsp;&nbsp;&nbsp; getValue: function()&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.value;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; });...]]></summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="asp.net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="combobox" label="combobox" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="coolite" label="coolite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="extjs" label="extjs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hack" label="hack" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[Previously: <a href="http://www.robertwray.co.uk/blog/2009/06/extjs-combobox-getvalue-oddity.html">extJs: Combobox .getValue oddity</a><br /><br />Here's a quick-hacky solution (a better one would be to ensure your combobox's are selection-only):<br /><br />Ext.override(Ext.form.ComboBox, {<br />&nbsp;&nbsp;&nbsp; getValue: function()<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return this.value;<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; });<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Coolite documentation</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/coolite-documentation.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.433</id>

    <published>2009-06-05T07:30:00Z</published>
    <updated>2009-06-11T10:07:07Z</updated>

    <summary>It might only have been auto-gen&apos;d from the sourcecode, but it&apos;s still better than nothing: Coolite Toolkit Documentation. The quality of (or lack of) documentation seems to be a fairly frequent complaint on the Coolite forums, and as there&apos;s not...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="asp.net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="coolite" label="coolite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="extjs" label="extjs" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[It might only have been auto-gen'd from the sourcecode, but it's still better than nothing: <a href="http://docs.coolite.com/">Coolite Toolkit Documentation</a>. The quality of (or lack of) documentation seems to be a fairly frequent complaint on the Coolite forums, and as there's not quite always a one-to-one mapping between Coolite and extJs, looking at the (comprehensive) <a href="http://extjs.com/deploy/dev/docs/">extJs documentation</a> isn't always useful.<br /><br />In addition, to anyone working with Coolite, I would strongly recommend downloading the sourcecode and reviewing it when you come across strange/unexpected/confusing behaviours. It's not that difficult to step-through and get a fairly good idea of what's going on!<br />]]>
        
    </content>
</entry>

<entry>
    <title>extJs: Combobox .getValue oddity</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/extjs-combobox-getvalue-oddity.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.432</id>

    <published>2009-06-04T07:30:00Z</published>
    <updated>2009-06-11T10:04:12Z</updated>

    <summary><![CDATA[At least in extJs version 2.2.1 (the version baked into Coolite v0.8), the getValue function on the Ext.form.ComboBox appears to be thus:function(){&nbsp; if (this.valueField&amp;&amp;this.forceSelection)&nbsp; {&nbsp;&nbsp;&nbsp; return typeof this.value!="undefined"?this.value:"";&nbsp; }&nbsp; else&nbsp; {&nbsp;&nbsp;&nbsp; return Ext.form.ComboBox.superclass.getValue.call(this);&nbsp; }}Of interest is the fact that differing...]]></summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Javascript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="asp.net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="coolite" label="coolite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="extjs" label="extjs" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[At least in extJs version 2.2.1 (the version baked into <a href="http://www.coolite.com/">Coolite v0.8</a>), the getValue function on the <a href="http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox">Ext.form.ComboBox</a> appears to be thus:<br /><br /><blockquote>function()<br />{<br />&nbsp; if (this.valueField&amp;&amp;this.forceSelection)<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; return typeof this.value!="undefined"?this.value:"";<br />&nbsp; }<br />&nbsp; else<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; return Ext.form.ComboBox.superclass.getValue.call(this);<br />&nbsp; }<br />}<br /></blockquote>Of interest is the fact that differing code-paths are taken based on the "forceSelection" property. If it's set (i.e. thou shalt choose something from this combo and not enter free-text), then the .value property is used as the return value of the call to getValue, otherwise a call is made to superclass.getValue, <b>which returns something quite entirely different!</b><br /><br />Instead of, as expected, returning the "key" value, it returns the displayed value. This is thanks to superclass.getValue being defined as:<br /><br /><blockquote>function()<br />{<br />&nbsp; if (!this.rendered)<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; return this.value;<br />&nbsp; }<br />&nbsp; var v=this.el.getValue();<br />&nbsp; if (v===this.emptyText || v===undefined)<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; v='';<br />&nbsp; }<br />&nbsp; return v;<br />}<br /></blockquote>Whilst I've logged this as an "oddity", it is (seemingly) "by-design" as the combo-box allows for user-entered values, which is what the "forceSelection" code-branch causes. That said, I firmly believe that if the "selected value" is one that has been chosen from the contained items, then getValue should return in the same way as it does with forceSelection being false.<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>A review of &quot;Review: CryptoLicensing for .NET&quot;</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/a-review-of-review-cryptolicen.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.431</id>

    <published>2009-06-03T07:30:00Z</published>
    <updated>2009-06-04T09:14:31Z</updated>

    <summary>The review of CryptoLicensing for .NET that Roy Osherove posted recently was very well written and covered a topic that I&apos;ve long held a mild level of curiosity around. That topic being protecting code/software that&apos;s written using a .net language...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Other" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Tech" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Visual Studio" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="net" label=".net" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="licensing" label="licensing" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[The review of <a href="http://weblogs.asp.net/rosherove/archive/2009/06/02/review-cryptolicensing-for-net.aspx">CryptoLicensing for .NET</a> that Roy Osherove posted recently was very well written and covered a topic that I've long held a mild level of curiosity around. That topic being protecting code/software that's written using a .net language from a licensing perspective. <br /><br />There's a whole black-market industry surrounding the cracking of software and irrespective of the legality or ethics of it, I'm pretty sure a lot of people have used cracked software at some point (bonus points and the moral high-ground to those who claim they haven't and are actually telling the truth!). Be it cracked/patched software, a serial number generator, a serial number that everyone's using, there are ways and means. By far the simplest is probably with something like WinRAR that pops up a "Please purchase WinRAR license" dialog box and relies on honesty, with more complex and convoluted solutions like Microsoft's OS licensing that can go horribly wrong if their activation servers have a bad day. Not to mention the "what will happen when" scenario for when Microsoft finally get bored of providing activation servers/services for Windows XP.<br /><br />The thing that particularly sparked my interest was a comment from <a href="http://weblogs.asp.net/fbouma/">Frans Bouma</a>, which could be summed up pretty much as saying "whats the point?", which seems to be a very good question. My opinion is that some form of licensing/activation solution at least raises the bar and reminds people using the software isn't actually free for them to use and do with it what they will. Plus, software that has an "n-day trial" that's expired is likely to get paid for if it's expired and then its use is required. I frequently install software for a single/ocassional task that has a "30 day trial" attached, or similar, and then promptly forget about it. When I then come to perform that task again 6 months later, if the price is right I end up buying it. If not, off comes the software and something else is found. <br /><br />A fantastic example of this is a project I worked on about 2 years ago, I'd played around with a trial version of some .net data access layer generating software (I can't for the life of me remember what it was, one laptop later and it's not installed - but I have the license key somewhere!) a few months before that for a one-time-use tool I needed to write and then had this project thrown at me with a very tight deadline and no other development resource. I remembered the software, loaded it up, "out of trial", bugger! One credit card transaction later the license key was in my inbox and in the product. So, licensing control software worked for the publisher concerned!<br /><br />Now, I wonder if there's a trial version of CryptoLicensing available that I can have a play with,....?<br />]]>
        
    </content>
</entry>

<entry>
    <title>MySql - Running a complex script using the .net Connector</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/mysql---running-a-complex-scri.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.430</id>

    <published>2009-06-02T07:30:00Z</published>
    <updated>2009-06-04T08:50:03Z</updated>

    <summary>[The solution was discovered via this entry in the mysql.com forums]I your MySql script contains code like &quot;/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;&quot;You&apos;ll need to add &quot;Allow User Variables=true&quot; to your connection string. This can be achieved by manually adding it to...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="MySql" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="netconnector" label=".netconnector" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="c" label="c#" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mysql" label="mysql" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[[The solution was discovered via <a href="http://forums.mysql.com/read.php?47,226661,230044#msg-230044">this entry</a> in the mysql.com forums]<br /><br />I your MySql script contains code like <br /><br /><blockquote>"/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;"<br /></blockquote>You'll need to add "Allow User Variables=true" to your connection string. This can be achieved by manually adding it to the string, or, if using a MySqlConnectionStringBuilder, something similar to the following:<br /><br /><blockquote>var builder = new MySqlConnectionStringBuilder<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp; Database = database,<br />&nbsp;&nbsp;&nbsp;&nbsp; Server = Server,<br />&nbsp;&nbsp;&nbsp;&nbsp; Password = Password,<br />&nbsp;&nbsp;&nbsp;&nbsp; UserID = Username<br />};<br />builder.Add("Allow User Variables", true);<br /></blockquote>Make sure you're using at least version <a href="http://dev.mysql.com/downloads/connector/net/5.2.html">5.2.6 of the MySql Connector/Net</a> though! The forum posting states that it works with 5.2.2, but it didn't work with the copy of 5.2.2 I hav, but did with 5.2.6.<br /><br /><b>Other useful links from the forums:</b><br /><blockquote><a href="Re:%20How%20do%20i%20run%20a%20*.sql%20script%20from%20my%20c#%20environment?">Re: How do i run a *.sql script from my c# environment?</a><br /></blockquote><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>A string of character &apos;x&apos; the same length as string &apos;y&apos;</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/06/a-string-of-character-x-the-sa.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.429</id>

    <published>2009-06-01T07:30:00Z</published>
    <updated>2009-06-03T15:14:49Z</updated>

    <summary><![CDATA[... is quite simple in .net, as I found out!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string title = "My line of text that I'm writing to the console underlined with equals signs";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(title);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(new String('=', title.Length));...]]></summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[... is quite simple in .net, as I found out!<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string title = "My line of text that I'm writing to the console underlined with equals signs";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(title);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(new String('=', title.Length));<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Sql Server - PIVOT function</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/05/sql-server---pivot-function.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.428</id>

    <published>2009-05-29T15:26:22Z</published>
    <updated>2009-05-29T15:30:03Z</updated>

    <summary>I&apos;ve seen code in pre-Sql Server 2005 (i.e. 2000) where PIVOT-esque functions were carried out and my god were they complicated, messy, HORRID beasts. Put quite bluntly, if I never have to see that code again it&apos;ll be far too...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term="SqlServer" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="sqlserver2005" label="sqlserver2005" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[I've seen code in pre-Sql Server 2005 (i.e. 2000) where PIVOT-esque functions were carried out and my god were they complicated, messy, HORRID beasts. Put quite bluntly, if I never have to see that code again it'll be far too soon.<br /><br />I was only reminded of this by coming across a post by Dan Wahlin titled "<a href="http://weblogs.asp.net/dwahlin/archive/2009/05/28/pivots-to-the-rescue-providing-flexible-sql-server-queries.aspx">Pivots to the Rescue - Providing Flexible SQL Server Queries</a>" that gives a good explanation and use-case for them. Something that I'm sure I'll find a use for in the near future!<br /> ]]>
        
    </content>
</entry>

<entry>
    <title>PDB Files ... The Complete Works - there&apos;s more!</title>
    <link rel="alternate" type="text/html" href="http://www.robertwray.co.uk/blog/2009/05/pdb-files-the-complete-works--.html" />
    <id>tag:www.robertwray.co.uk,2009:/blog//7.427</id>

    <published>2009-05-29T09:51:28Z</published>
    <updated>2009-05-29T09:52:54Z</updated>

    <summary>One of the really annoying things with PDB files is when you don&apos;t have them for something. Be it 3rd party component, module you just plain don&apos;t care about. John Robbins seems to be the PDB guru and has written...</summary>
    <author>
        <name>Rob</name>
        
    </author>
    
        <category term=".net" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Visual Studio" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="c#" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="pdb" label="PDB" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.robertwray.co.uk/blog/">
        <![CDATA[One of the really annoying things with PDB files is when you don't have them for something. Be it 3rd party component, module you just plain don't care about. John Robbins seems to be the PDB guru and has written "<a href="http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/29/keeping-specific-pdb-files-from-loading-in-the-debugger.aspx">Keeping specific PDB files from loading in the debugger</a>".<br /><br />The guy's a genius.<br />]]>
        
    </content>
</entry>

</feed>
