<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Blogs - eCraft Labs</title>
  <icon>http://labs.ecraft.com/Content/icons/favicon.ico</icon>
  <logo>http://labs.ecraft.com/Content/icons/favicon.png</logo>
  <updated>2010-06-16T13:30:00</updated>
  <id>http://labs.ecraft.com/blogs/atom</id>
  <link rel="alternate" type="text/html" hreflang="en" href="/blogs/atom"/>
  <link rel="self" type="application/atom+xml" href="http://labs.ecraft.com/Blogs/ATOM"/>
  <generator uri="http://oxite.net" version="1.0">Oxite</generator>
  <entry>
    <title type="html">We’re hiring in Vaasa</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/Were-hiring-in-Vaasa"/>
    <id>http://labs.ecraft.com/Blogs/Were-hiring-in-Vaasa</id>
    <updated>2010-06-17T12:51:28.04</updated>
    <published>2010-06-16T13:30:00</published>
    <author>
      <name>jorgen.westerling@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Administrativia" />
    <content type="html" xml:lang="en">
      &lt;p&gt;We have been on the quiet side on the blog lately, but fortunately that’s because we’ve been super busy with customer work. This means we need more dev muscle.&lt;/p&gt; &lt;p&gt;Sorry for spamming the blog with a recruitment plug, but if you are a guru dev looking for a change of scenery in the Vaasa region, have a look at our job posting on our &lt;a href=&quot;http://ecraft.com/en/get-a-job/software-guru-to-vaasa/&quot; target=&quot;_blank&quot;&gt;main web site here&lt;/a&gt;. Thanks!&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">SharePoint Event Handler Gotchas</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/SharePoint-Event-Handler-Gotchas"/>
    <id>http://labs.ecraft.com/Blogs/SharePoint-Event-Handler-Gotchas</id>
    <updated>2010-04-26T07:42:20.003</updated>
    <published>2010-04-26T07:30:00</published>
    <author>
      <name>andreas.finne@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Gotcha" />
    <category term="SharePoint" />
    <content type="html" xml:lang="en">
      &lt;p&gt;In a previous SharePoint project, I implemented a few event handlers that get called whenever an item in a list gets changed (or added/deleted). There were a few problems along the way that took a bit of searching before I found solutions. This post documents a few of the things that are good to know.&lt;/p&gt;  &lt;p&gt;The event handlers that I implemented where all of the synchronous &lt;font face=&quot;Consolas&quot;&gt;ItemUpdating&lt;/font&gt; kind. There are also asynchronous events, like for instance &lt;font face=&quot;Consolas&quot;&gt;ItemUpdated&lt;/font&gt;, but for the scenario at hand, I wanted to have some special handling depending on certain values of an item.&lt;/p&gt;  &lt;p&gt;The event handler is of the form &lt;br/&gt;&lt;font face=&quot;Consolas&quot;&gt;public override void ItemUpdating(SPItemEventProperties properties)&lt;/font&gt;.&lt;/p&gt; The &lt;font face=&quot;Consolas&quot;&gt;properties&lt;/font&gt; object contains the collections &lt;font face=&quot;Consolas&quot;&gt;BeforeProperties&lt;/font&gt; and &lt;font face=&quot;Consolas&quot;&gt;AfterProperties&lt;/font&gt; that helps you to find out what has changed for your item,&amp;#160; i.e. compare &lt;br/&gt;&lt;font face=&quot;Consolas&quot;&gt;properties.BeforeProperties[&amp;lt;field name&amp;gt;].ToString()&lt;/font&gt; to &lt;br/&gt;&lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[&amp;lt;field name&amp;gt;].ToString()&lt;/font&gt;. You can also modify the value of the fields in &lt;font face=&quot;Consolas&quot;&gt;AfterProperties&lt;/font&gt; to affect what is actually stored in the list.&lt;/p&gt;  &lt;p&gt;Here comes the first gotcha; the &lt;font face=&quot;Consolas&quot;&gt;BeforeProperties&lt;/font&gt; are only populated for document libraries. If you have an event handler on a custom list, the &lt;font face=&quot;Consolas&quot;&gt;BeforeProperties&lt;/font&gt; collection is empty. So in order to check the current value of a field, you have to use &lt;font face=&quot;Consolas&quot;&gt;properties.ListItem[&amp;lt;field name&amp;gt;]&lt;/font&gt; instead. &lt;/p&gt;  &lt;p&gt;Second gotcha; be aware of the internal name of fields. They have a sneaky behaviour in this case. As usual you should use the internal name of the field instead of the display name when accessing the field, i.e. &lt;font face=&quot;Consolas&quot;&gt;“Evaluation_x0020_Date”&lt;/font&gt; instead of &lt;font face=&quot;Consolas&quot;&gt;“Evaluation Date”&lt;/font&gt;. However, you can do &lt;font face=&quot;Consolas&quot;&gt;properties.ListItem[“Evaluation Date”]&lt;/font&gt; to get the current value of the field, BUT to get the new value from &lt;font face=&quot;Consolas&quot;&gt;AfterProperties&lt;/font&gt;, you have to do &lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[“Evaluation_x0020_Date”]&lt;/font&gt;. Here comes the even sneakier behaviour; if you try to do &lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[“Evaluation Date”]&lt;/font&gt;, it doesn’t fail, but returns null. Usually, if you try to access a field that does not exist, an exception is thrown. However, “Evaluation Date” passes as a valid field name, but the value cannot be found.&lt;/p&gt;  &lt;p&gt;The third problem I had was related to date fields. In my event handler, I wanted to make sure that a certain date field remained unchanged if some other condition was met. The easiest solution would of course be    &lt;br /&gt;&lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[“Decision Date”] = properties.BeforeProperties[“Decision Date”]&lt;/font&gt;     &lt;br /&gt;As already stated in the first gotcha, the &lt;font face=&quot;Consolas&quot;&gt;BeforeProperties&lt;/font&gt; is not populated for lists, so the statement was revised to     &lt;br /&gt;&lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[“Decision Date”] = properties.ListItem[“Decision Date”]&lt;/font&gt;&lt;p&gt;Now, this is still too simple, if you read the gotcha number two, you know that we have to use the internal name. Taking this into account, the third revision of the line is     &lt;br /&gt;&lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[“Decision_x0020_Date”] = properties.ListItem[“Decision_x0020_Date”]&lt;/font&gt;     &lt;p&gt;This still doesn’t work. Even though all the properties are strings, and it is the same field, the formats of the strings are somehow still incompatible. The data type in this case was a datetime. It turns out that the format that comes out of the &lt;font face=&quot;Consolas&quot;&gt;ListItem&lt;/font&gt; is in the format the SharePoint site uses, while the &lt;font face=&quot;Consolas&quot;&gt;AfterProperties&lt;/font&gt; need the date in ISO8601 format. The fourth and final iteration (that actually works) of the line ended up as     &lt;br /&gt;&lt;font face=&quot;Consolas&quot;&gt;properties.AfterProperties[“Decision_x0020_Date”] = Microsoft.SharePoint.Utilities.SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Parse(properties.ListItem[“Decision_x0020_Date”].ToString()))&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Short and concise.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Update about Snoop</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/Update-about-Snoop"/>
    <id>http://labs.ecraft.com/Blogs/Update-about-Snoop</id>
    <updated>2010-03-29T07:02:52.553</updated>
    <published>2010-03-29T07:01:00</published>
    <author>
      <name>andreas.finne@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Debugging" />
    <category term="WPF" />
    <category term="Tips" />
    <category term="Tools" />
    <content type="html" xml:lang="en">
      &lt;p&gt;A couple of days after my &lt;a href=&quot;http://labs.ecraft.com/Blogs/Tools-for-WPF-debugging&quot;&gt;last post&lt;/a&gt; about tools for WPF debugging, I got the word that Snoop has been made open source and &lt;a href=&quot;http://snoopwpf.codeplex.com/&quot;&gt;released on Codeplex&lt;/a&gt;. There are versions for both 32- and 64-bit systems, and even WPF 4.0 is supported. &lt;/p&gt;  &lt;p&gt;This version of Snoop is based on version 2 of the original Snoop and contains a merge of the improvements done by different people, so it supports on-the-fly editing of properties, WPF interop scenarios (WPF hosting Windows Forms or vice versa), bug fixes including support for visual trees with more that 255 levels, among other improvements. &lt;a href=&quot;http://www.cplotts.com/2009/12/08/snoop-now-with-64-bit-support-and-more/&quot;&gt;Check out Cory Plotts’ blog post about the release&lt;/a&gt;.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Tools for WPF debugging</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/Tools-for-WPF-debugging"/>
    <id>http://labs.ecraft.com/Blogs/Tools-for-WPF-debugging</id>
    <updated>2010-02-08T10:47:27.117</updated>
    <published>2010-02-08T10:47:17</published>
    <author>
      <name>andreas.finne@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Debugging" />
    <category term="WPF" />
    <category term="Tips" />
    <category term="Tools" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Just a short note about a couple of tools I've been using when developing WPF applications. Please refer to the links for more information about the tools. &lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://blois.us/Snoop/&quot;&gt;Snoop&lt;/a&gt; provides visual debugging of WPF applications at runtime.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://cracknetproject.codeplex.com/&quot;&gt;Crack.NET&lt;/a&gt; is a runtime debugging and scripting tool. Also supports Windows Forms applications.&lt;/p&gt;  &lt;p&gt;&lt;a href=&quot;http://karlshifflett.wordpress.com/mole-for-visual-studio/&quot;&gt;Mole&lt;/a&gt; is a Visual Studio visualizer allowing unlimited drilling into objects and sub-objects.&lt;/p&gt;  &lt;p&gt;Due to the way the hooks are written, neither Snoop nor Crack.NET will work on 64-bit processes. However, there is an x64 version of Snoop available on &lt;a href=&quot;http://team.interknowlogy.com/blogs/danhanan/archive/2009/07/15/64-bit-snoop-for-wpf-development.aspx&quot;&gt;Dan’s IK Blog&lt;/a&gt; (there is an updated version &lt;a href=&quot;http://team.interknowlogy.com/blogs/danhanan/archive/2009/09/23/improvements-to-the-wpf-snoop-utility.aspx&quot;&gt;here&lt;/a&gt;). This version is based on an earlier version of Snoop where property value editing is supported, so even though you’re living in a 32-bit world, you can take advantage of this version.&lt;/p&gt;  &lt;p&gt;Check them out!&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Disable hotkey for Microsoft Groove</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/Disable-hotkey-for-Microsoft-Groove"/>
    <id>http://labs.ecraft.com/Blogs/Disable-hotkey-for-Microsoft-Groove</id>
    <updated>2010-01-07T10:46:20.423</updated>
    <published>2010-01-07T10:46:11</published>
    <author>
      <name>andreas.finne@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Tips" />
    <content type="html" xml:lang="en">
      &lt;p&gt;Microsoft Office Groove has a nifty little hotkey. If you press shift twice, a dialog comes up to let you write a message. This is even more annoying than the accessibility sticky keys or filter keys dialog. And guess what, there is no way to disable the hotkey in the user interface! I haven’t found the place to do it at least.&lt;/p&gt;  &lt;p&gt;I got so annoyed with this that I asked our internal IT support how to disable it. The answer was that you have to edit the registry.&lt;/p&gt;  &lt;p&gt;Here are the instructions I got. And remember, all the normal disclaimers apply: &lt;b&gt;It is dangerous to modify the registry if you don’t know what you’re doing! We are not responsible for any damage that may occur if you try to follow these instructions.&lt;/b&gt; With that out of the way, here’s the information you have been waiting for.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Make sure that Groove is shut down &lt;/li&gt;    &lt;li&gt;Locate the path &lt;b&gt;HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\12.0\Groove&lt;/b&gt;&lt;/li&gt;    &lt;li&gt;If this does not contain a sub key called &lt;b&gt;InstaGroove&lt;/b&gt;, then create it &lt;/li&gt;    &lt;li&gt;For the InstaGroove key, create a new &lt;b&gt;DWORD Value&lt;/b&gt; called &lt;b&gt;DisableHotkey&lt;/b&gt;&lt;/li&gt;    &lt;li&gt;Set the value data to &lt;b&gt;1&lt;/b&gt;&lt;/li&gt;    &lt;li&gt;Start Groove and verify that pressing shift twice does not pop up the message any more&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Really simple, right?&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">SharePoint Feature Dependencies</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/SharePoint-Feature-Dependencies"/>
    <id>http://labs.ecraft.com/Blogs/SharePoint-Feature-Dependencies</id>
    <updated>2009-12-17T13:06:10.307</updated>
    <published>2009-12-17T12:05:59</published>
    <author>
      <name>andreas.finne@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Gotcha" />
    <category term="SharePoint" />
    <content type="html" xml:lang="en">
      &lt;p&gt;When declaring a feature, you can add an &amp;lt;ActivationDependencies&amp;gt; section to your feature.xml file. Here you can list the features your own feature is depending on. &lt;/p&gt;  &lt;p&gt;According to the documentation on activation dependencies (&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa543162.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/aa543162.aspx&lt;/a&gt;), the depending features get automatically activated if they are in the same scope: “&lt;em&gt;If a Feature is dependent on another Feature at the same scope, and the second Feature is not activated when the first one is activated, Windows SharePoint Services activates the second Feature&lt;/em&gt;”&lt;/p&gt;  &lt;p&gt;This is incorrect!&lt;/p&gt;  &lt;p&gt;The second feature is activated automatically &lt;b&gt;only if it is hidden!&lt;/b&gt;&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Second post</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/Second-post"/>
    <id>http://labs.ecraft.com/Blogs/Second-post</id>
    <updated>2009-11-18T07:43:45.15</updated>
    <published>2009-11-11T13:40:00</published>
    <author>
      <name>nicklas.andersson@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Labs" />
    <category term="eCraft" />
    <content type="html" xml:lang="en">
      &lt;p&gt;As the self-proclaimed alpha male of the nerd herd here at eCraft I also want to add my 2 cents to why we’re doing this blog and what we expect to do with it. &lt;/p&gt;&lt;p&gt;I think in short it could be described as us bringing all those interesting, weird and wonderful discussions that happen in the corridors of the eCraft offices out in the public, especially those discussions that relate to software development and technology. Like J&#246;rgen wrote in &lt;a href=&quot;http://labs.ecraft.com/Blogs/Introducing-eCraft-Labs&quot; target=&quot;_blank&quot;&gt;his post&lt;/a&gt;, there will be code, there will be ideas, there will be thoughts and there may even be an application or a video or two. And rest assured, all of it will be somewhat half-baked. Because we’re not selling anything here, we’re just sharing things that we find interesting and that we discuss among ourselves with a wider audience. And we hope that there will at least be some amount of discusson and comments from that audience.&lt;/p&gt;
&lt;p&gt;Because who knows, you just might find some of this stuff useful.&lt;/p&gt;
    </content>
  </entry>
  <entry>
    <title type="html">Introducing eCraft Labs</title>
    <link rel="alternate" type="text/html" href="http://labs.ecraft.com/Blogs/Introducing-eCraft-Labs"/>
    <id>http://labs.ecraft.com/Blogs/Introducing-eCraft-Labs</id>
    <updated>2009-11-18T07:44:46.72</updated>
    <published>2009-11-06T08:00:00</published>
    <author>
      <name>jorgen.westerling@ecraft.com</name>
    </author>
    <category term="Blogs" />
    <category term="Administrativia" />
    <category term="Labs" />
    <content type="html" xml:lang="en">
      &lt;p&gt;eCraft Labs is the home of the geeks at eCraft. It's a bit messy. Some stains, pizza boxes and coffee cups may be found laying about. As the name suggests, we will post experiments, thoughts, ideas, snippets of code, small utilities, real life experiences from the trenches, videos and so on. None of the posts have been tested on animals. We take pride in that.&lt;/p&gt;
&lt;p&gt;
We will try to be as meticulous as always, but since this is laboratory grade stuff, use it or ignore it at your own risk.&lt;/p&gt;
&lt;p&gt;
If you are looking for our business blog, please head on over to &lt;a href=&quot;http://episto.la/&quot;&gt;episto.la&lt;/a&gt;.
If you are looking for our official site, &lt;a href=&quot;http://www.ecraft.com/&quot;&gt;www.ecraft.com&lt;/a&gt; is were you should go.
&lt;/p&gt;
&lt;p&gt;Now, enjoy and participate. We'd love to have your feedback.&lt;/p&gt;
    </content>
  </entry>
</feed>
