<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>Codestore Activity Log</title>
		<description>Latest ten updates to codestore, be they blogs or articles.</description>
		<language>en-gb</language>
		<link>http://www.codestore.net</link>
		<lastBuildDate>Tue, 22 Jul 2008 04:04:18 -0500</lastBuildDate>
		<atom:link href="http://www.codestore.net/store.nsf/rss.xml" rel="self" type="application/rss+xml" />

		<item>
			<title>Quick Tip: How to Use Colo(u)r on Visited Links | Blog</title>
			<pubDate>Tue, 22 Jul 2008 04:04:18 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>Back in the old days of HTML and the web it was all very simple -- websites were just plain old text scattered with links to other sites. Browser helped you out by distinguishing those links you'd read from those you hadn't. An unvisited blue link turned a purpley colour once visited. A useful visual tool to let you know you'd "read" a page.  <p>Forward to now and things aren't quite so simple. Websites aren't just collections of links to other places. There's often a whole load of links on any site that are for navigation within the same site.  <p>I was asked recently to change the colour of visited links on a database I'd created for a customer. What I didn't do was dive straight in with the easiest option and add some CSS like this:</p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">a{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">color</span>:<span style="color: #006080">gray;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">a:visited{ </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">color</span>:light<span style="color: #006080">-gray;</span> </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre></div></div>
<p>Doing so would have an adverse effect on the links in the site which <strong>don't</strong> point to <em>static</em> content within. Changing the colour of links only makes sense in the context of a link to a static page. At least I think so. Don't you?</p>
<p>Take the <a href="http://www-10.lotus.com/ldd/nd6forum.nsf/Dateallthreadedweb?OpenView">Domino forum on IBM's site</a> for example: </p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="434" alt="forum-read" src="http://www.codestore.net/store.nsf/rsrc/485BEA9FBD987EA78625748E0031D4AD/$file/forum-read_4.gif" width="499" border="0"> </p>
<p>This is a great example of a typical Domino website, where the main focus is on user-generated content and the rest of the site is there to help you navigate that content.&nbsp; <p>In the image above you can see a good example of visited link colours in action. Notice I've read the third document down in the view. I now know to over-look that one when I'm deciding what to pick to read next.&nbsp; <p>There's also an example of visited link colours used badly. Notice the "Next" link (see big red arrow ;o) has changed colour because I've been to the next screen of the view. However the next page is <strong>not</strong> static content. The change of colour should be used to tell me I've read that page and don't need to again. That's not true though, as the content of the page opened by that link is likely to change at any moment. 
<p>The "next link", in my mind, should be considered a functional link and should not change colour. The same goes for the "Forgot your password" link in the same image. The only links that should change colour are those that link to pages which don't change. 
<h4>How To Change Colour of Static Links Only</h4>
<p>The easiest way to do this that I've found is to change the markup of your links. Like so:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">="0/unid?OpenDocument"</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">="markread"</span><span style="color: #0000ff">&gt;</span>This is a link to a document<span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;</span></pre></div></div>
<p>The CSS then becomes:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">a{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">color</span>: <span style="color: #006080">gray;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&nbsp;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">a<span style="color: #cc6633">.markread</span>:visited{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">color</span>: light<span style="color: #006080">-gray;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre></div></div>
<p>&nbsp;</p>
<p>Only links with the class "markread" change colour once they are, errrm, read.</p>
<p>If you don't generate your own HTML for each link (and so can't add the class) you could do it an easier way and wrap your embedded View with a DIV element, like this (where the table would be generated by Domino of course):</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">="view"</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">table</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">tr</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            <span style="color: #0000ff">&lt;</span><span style="color: #800000">td</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">="view/doc1/"</span><span style="color: #0000ff">&gt;</span>Link to document 1<span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">td</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">            <span style="color: #0000ff">&lt;</span><span style="color: #800000">td</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">="view/doc2/"</span><span style="color: #0000ff">&gt;</span>Link to document 2<span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">td</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        <span style="color: #0000ff">&lt;/</span><span style="color: #800000">tr</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">table</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span></pre></div></div>
<p>&nbsp;</p>
<p>The CSS you need would then be:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">div</span><span style="color: #cc6633">.view</span> a:visited{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">color</span>:light<span style="color: #006080">-gray;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre></div></div>
<p>&nbsp;</p>
<p>What do you think? It certainly makes sense to me. While I don't know what the official guideline is on this I don't see it making sense to just mark <strong>all</strong> visited links in a different colour. </p>
<h4>In Summary</h4>
<p>Don't used a:visited in CSS for all links. Only use it for links to pages that rarely (if ever) change. Whether the IBM forum is a perfect example I don't know, but I hope you get the point.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080722?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080722</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080722</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080722?Open#comments</comments>
			<slash:comments>9</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080722</wfw:commentRss>
		</item>
		<item>
			<title>My New Laptop - Replacing the Broken One | Blog</title>
			<pubDate>Mon, 21 Jul 2008 03:17:19 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>At the end of last month I mentioned <a href="http://www.codestore.net/store.nsf/unid/BLOG-20080630">my broken laptop</a>. Well, it's fixed now, in that I have a "new" one. I probably should have just bought it as soon as the old one went capput, as it's been a big old faff in between.</p> <p>As mentioned in the first post I dropped it off some step ladders and suspected the backlight of the screen to be broken. First thing I did was source one on eBay. There's a "shop" on eBay UK that specialises in CCFLs. </p> <p>Using the tiniest screwdriver I own I managed to get in to where the CCFL live and it was immediately clear that was the problem:</p> <div class="wlWriterSmartContent" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:d239b129-f210-4fc4-90a9-95ff4292b8bc" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><img border="0" src="http://www.codestore.net/store.nsf/rsrc/2F9D4DD583BCE2B98625748D002D87C6/$file/IMG_1589_3817.jpg" /></div> <p>There's little wonder it broke. It's like a flourescent tube that's 2mm wide. If anything's going to break after falling 6' then this is it.</p> <p>Using Karen's soldering skills (never thought I'd let Karen and a soldering iron anywhere near my laptop but she assured me she'd picked up the skill in a part-time job at some point!) we managed to install the replacement. On first boot the screen worked, which was a real woop-out-loud "Yes!" moment, followed shortly by a few expletives when the screen went weird and then refused to work again.</p> <p>At this point I resigned not to try another CCFL but to chance it with a replacement inverter (also sourced off eBay). This didn't work either and so I resigned to leave it at that. There's only so much you can do for a laptop of its age. Sadly I had to let it go.</p> <p>This is where I took Karen's advice and called our home insurance providers. As we're covered for accidental damage to our belongings it made sense to. In Karen's words "What's the point of being covered if you're never going to claim!?".</p> <p>What surprised me was that they agreed to pay out. Especially as it's a "business tool" and our policy is a domestic one, which doesn't cover such items, apparently. Not trusting insurance companies I expected them to use any excuse they could to avoid shelling out.</p> <p>A couple of days after the "field agent" had visited to assess the laptop I had a call from the company they use to replace IT equipment and they offered me some crappy HP laptop worth less than half what I paid for mine, which it's listed on our like-for-like policy as being worth. Apparently they "can't source Lenovos". </p> <p>While I considered what to do with their offer I carried on looking on eBay and managed to find a T42 with the same screen (15" SXGA for 1400*1050 res) which are farely hard to come by. It was in mint condition and up for £250. It arrived the next day. Despite it being a 2373-N1U and my old one a 2373-F7G I managed to swap the hard drives over and it started perfectly first time. That alone saved me a day's time in migrating to and configuring a new laptop. It also meant my current port replicator still worked! </p> <p>After swapping over the DVD bay and the spare RAM module I'd added to my old one I had, in effect, a brand-new laptop. From what I can tell it's never been used (still got the protective bits on top of the glass LED display). I'm a happy bunny once more. It's got an American keyboard but I can learn to live with that. What I've got now is my old laptop back but in sparkling condition.</p> <p>All that I need to do now is make up my mind about the insurance offer. Do I cancel the claim and protect my "clean slate" of never having claimed, thus reducing my premium (I presume?) or do I call back and haggle? It is after all a like-for-like policy and what I really want is a Lenovo T61. Maybe I just accept the HP they're offering and let Quinn and Karen use it. Maybe I accept and sell it on eBay?</p> <p>Where I'll have trouble is in arguing against what they've offered me, as it is the same spec on paper. I just don't want a HP. It leaves me wondering why Thinkpads are so pricey. How can I argue I need a laptop that costs more than twice the one they're offering me when they have the same spec?</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080721?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080721</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080721</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080721?Open#comments</comments>
			<slash:comments>10</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080721</wfw:commentRss>
		</item>
		<item>
			<title>More On Running Both LotusScript and Java WQS Agents Simultaneously | Blog</title>
			<pubDate>Fri, 18 Jul 2008 03:50:14 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>In response to <a href="http://www.codestore.net/store.nsf/unid/BLOG-20080717">yesterday's ponderings</a> it was quickly pointed out that I could easily run two agents in a Form's WQS event by simply calling one from within the other. Imagine this code in the first agent:</p><pre><span class="TPkeyword1">Dim </span>agentTwo <span class="TPkeyword1">As </span><span class="TPkeyword3">NotesAgent</span>
<span class="TPkeyword1">Set </span>agentTwo <span class="TPoperator">= </span><span class="TPkeyword2">database</span>.GetAgent<span class="TPbracket">(</span><span class="TPstring">"(wqs Agent Two)"</span><span class="TPbracket">)</span>

agentTwo.Run<span class="TPbracket">( </span>document.NoteID <span class="TPbracket">)</span>
</pre>
<p>All seems fairly obvious and I don't know why I didn't think to try it in the first place. </p>
<p>However, there's a problem with this approach. Running the second agent against the document in which the first WQS agent was triggered only works if you save the document before running Agent Two and then again before leaving Agent Two.</p>
<p>The first save within Agent One is needed for two reasons. </p>
<ol>
<li>A <em>new</em> document doesn't have a NoteID, which you need to pass to the other agent, until it's been saved. </li>
<li>Any changes you make to the document in the code in Agent One won't be reflected in the document you see in Agent Two. This is because Agent Two is getting a handle on the document that has been committed to the disk and <strong>not</strong> the context document, which Agent One is working on.</li></ol>
<p>The second save is called at the end of Agent Two and is needed because we're operating outside the context of the document being saved. We won't be able to access the altered values in Agent One after Agent Two has run as we're effectively working on different instances of the same document. At least that's how I understand it. Although in practice I found that changes made in Agent Two don't commit anyway as they're over-written by the impending save of the document from the completion of Agent One, which is the controlling WQS agent.</p>
<p>All in all, while testing this, I found it doesn't really pan out like you'd hope it would and it's not an approach I'd recommend or like to use myself. The only time I'd use it is if the code in Agent Two was merely reading the document and not making any changes. Then there's the matter of calling doc.save() from within a WQS agent, which I never like to do. It just seems wrong.</p>
<p>In summary, if you want to run two agents in the WQS event -- one LotusScript, one Java -- then I'd still recommend running them one after the other, as <a href="http://www.codestore.net/store.nsf/unid/BLOG-20080717">shown yesterday</a> and avoid having to save a document which is already being saved. If you want to run Java that merely needs read access to the document then it might work for you.</p>
<p>If you're interested in seeing how I came to the above conclusions <a href="http://www.codestore.net/store.nsf/rsrc/bloggifs40/$file/LS2JWQS.nsf">here's the database</a> I was messing about with. Put it on a server and watch the console while saving documents. You should get an idea of what's going on.</p>
<p>I'm still leaning toward re-writing the agent in Java though...</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080718?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080718</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080718</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080718?Open#comments</comments>
			<slash:comments>6</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080718</wfw:commentRss>
		</item>
		<item>
			<title>Running Two WQS Agents, Where One is Conditional on the Other | Blog</title>
			<pubDate>Thu, 17 Jul 2008 03:25:16 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>A thought occurred to me yesterday. We all know you can run multiple WQS agents and that you can make them conditional using @If statements, right? What I didn't know was whether you could have two agents run but only have the second agent run depending on the outcome of the first. Imagine the code below:</p> <p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="327" alt="ScreenShot001" src="http://www.codestore.net/store.nsf/rsrc/F59AF7BFEEB7369386257489002E420D/$file/ScreenShot001_3.gif" width="536" border="0"> </p> <p>&nbsp;</p> <p>In the example shown, does the server decide which agents to run and then just run them or does it run the first and then enter the @If to decide whether to run the second? That's what I didn't know. Well, it turns out it's the latter case. Agent One runs and sets a field on the document called "runSecondAgent" to a value of 1. This trigger Agent Two. If in Agent One you stop the code from setting that field value then Agent Two doesn't run. Just what I was hoping would happen.</p> <p class="sidePanel">Something I found out from testing this out is that you can't "print" to the browser from consecutive agents. Anything you print from the first is lost if a second agent runs. Even if that second agent doesn't print anything.</p> <h4>How did I end up wondering this in the first place?</h4> <p>It came about because I wanted to use the <a href="http://www.lowagie.com/iText/">iText PDF library</a> to create and send out an invoice once a document was saved. The Form already has a WSQ agent written in LotusScript. To generate the PDF I need to run some Java. Therein lied the problem. Depending on certain logic in the main LotusScript WQS agent I need to run some Java. The concept above solves this.</p> <p>It's a bit of a messy solution though. Makes me wonder if there's isn't another way?</p> <h4>An Alternative, Which I'd Tried First, But Which Failed</h4> <p>Before I got to wondering about the conditional agents I had tried using LS2J. Ever heard of it? It allows you to call JavaScript code from within LotusScript. I've used it successfully in the past to resize images from LotusScript using <a href="http://www.nsftools.com/blog/blog-11-2004.htm#11-19-04">Julian's code</a>. It's all very clever, but in this case doesn't seem much use as I can't find a way to pass a handle to the document context in to the Java class used.</p> <p>I did all the usual LS2J stuff to create an object of the class called PDFInvoice, the code for which lived in a Java Code Library in the database and looked something like this:</p> <div> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> import lotus.domino.*;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>&nbsp; </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> PDFInvoice extends AgentBase{</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     Database db;</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>     <span style="color: #0000ff">public</span> PDFInvoice (String docUnid) throws NotesException    {    </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>         <span style="color: #0000ff">try</span> { </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>             Session s = getSession();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>             <span style="color: #008000">//Can't get past the above line        </span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>         } <span style="color: #0000ff">catch </span>( Exception e ){</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>             e.printStackTrace();</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>         }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>     }</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span> }</pre></div></div>
<p>It fails on line 8 though when you try and create a session object. Any reference to "s" after that returns a "null pointer".</p>
<p>Is there no way in LS2J to have the Java that's called operate on the current document (or any Notes objects for that matter)? As I understand it you can only pass primitive data-types as arguments. However, I was hoping to pass the document's ID over and somehow get to it that way. If I can't open a session though, how would that work?</p>
<p>I'm starting to wonder how good an idea it would be to just write all Agents in Java from now on. Seems to me there's little LotusScript can do that Java can't. Whereas the opposite is not true at all.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080717?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080717</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080717</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080717?Open#comments</comments>
			<slash:comments>7</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080717</wfw:commentRss>
		</item>
		<item>
			<title>MetaWeblog.newMediaObject and Word 2007 -- BlogId as Integer and URL as String | Blog</title>
			<pubDate>Wed, 16 Jul 2008 04:23:55 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>This is one of those posts that will be of little interest or use to my regular readers but which I felt compelled to write in order to try and save future Googlers the pain I've suffered these last few days.</p> <p>It's no coincidence that on Monday I was talking about <a href="http://www.codestore.net/store.nsf/unid/BLOG-20080714">changes to the way I post blogs</a> and that I've been asked by a customer to enable posting to their Notes-based blogging system from Word 2007. Being paid to write code you've been wanting to do in your spare time is brilliant when it happens, which is all too rarely.</p> <p>The system is one I've talked about in the past and was developed to allow students to have a private blogging area (<a href="http://www.rockalldesign.com/home.nsf/case_studies/myplace/">case study</a>) within their university. As all of the students on campus are about to be upgraded to Word 2007 it's seems logical to support blogging directly from what most seem use as their preferred "text editor". Heck, it's better than them copy/pasting from Word to TinyMCE. What a mess that makes!</p> <p>In the same way Windows Live Writer (WLW) works Word 2007 also uses the Metaweblog API (or any other for that matter) to post to blogs. If you've written the code to support posting from WLW then you should be able to support Word too. That's the theory at least. You'd think that the fact there's a spec for both the XML-RPC and the Metaweblog API would mean the Word developers would know how to go about using them. This is Microsoft though and that would be too easy. Instead, in a way only Microsoft can, they've re-invented the specs. Well, at least they've refused to follow them to the letter. </p> <p>&nbsp;</p> <p><strong>Problem 1</strong> -- The First Paramater Passed to the newMediaObject Method is Meant to be a String.</p> <p>If you've written your own Java code to handle uploading files, it would look something like this.</p> <div> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> Hashtable newMediaObject(String blogid,String username,String password,Hashtable content){</pre></div></div>
<p>The problem is that Word 2007 passes the blogid parameter as an <strong>integer</strong>. That's the first of two WTFs. To get round this one you have to write an over-loaded method just to handle calls from Word, like so:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> Hashtable newMediaObject(<span style="color: #0000ff">int</span> blogid, String username, String password, Hashtable content)</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>         throws Exception {</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>             <span style="color: #0000ff">return</span> newMediaObject(Integer.toString(blogid), username, password, content);</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> }</pre></div></div>
<p>One problem solved. One to go.</p>
<p><strong>Problem 2</strong> -- Word Expects the newMediaObject to return the URL as a String</p>
<p>When XML-RPC data is returned to the calling client the XML it sends tells you what type of data it contains by wrapping it in certain tags. The XML is something like:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4; max-height: 200px">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">struct</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">member</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span>upperBound<span style="color: #0000ff">&lt;/</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">value</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">int</span><span style="color: #0000ff">&gt;</span>139<span style="color: #0000ff">&lt;/</span><span style="color: #800000">int</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">value</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">member</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">member</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>        <span style="color: #0000ff">&lt;</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span>empty<span style="color: #0000ff">&lt;/</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>        <span style="color: #0000ff">&lt;</span><span style="color: #800000">value</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>            <span style="color: #0000ff">&lt;</span><span style="color: #800000">boolean</span><span style="color: #0000ff">&gt;</span>false<span style="color: #0000ff">&lt;/</span><span style="color: #800000">boolean</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>        <span style="color: #0000ff">&lt;/</span><span style="color: #800000">value</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">member</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">member</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span>Title<span style="color: #0000ff">&lt;/</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">value</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">string</span><span style="color: #0000ff">&gt;</span>This is a simple test<span style="color: #0000ff">&lt;/</span><span style="color: #800000">string</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">value</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">member</span><span style="color: #0000ff">&gt;</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">struct</span><span style="color: #0000ff">&gt;</span></pre></div></div>
<p>&nbsp;</p>
<p>Although the Title in this example (line 17) is returned explicitly as a string it doesn't need to be. The XML-RPC spec says that any value not wrapped in a tag that tells you what type it is can be assumed to be a string. </p>
<p>With most blogging clients you can return basic strings without wrapping them in a &lt;string&gt; tag. Apart from when you return the URL to Word 2007 following a newMediaObject call. The URL <strong>must</strong> be wrapped in a &lt;string&gt; tag! If not you'll just get a non-explicit error from Word saying your blog service doesn't support uploading of images, which isn't of course true. It's that Word doesn't follow the spec.</p>
<p>To get round this I had to hack my Java inspect the XML it was about to return and make sure any URL values sent back were set as strings, like so:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> xml.replaceAll(</pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>         <span style="color: #006080">"&lt;name&gt;url&lt;/name&gt;&lt;value&gt;(\\S*)&lt;/value&gt;&lt;/member&gt;"</span>, </pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>         <span style="color: #006080">"&lt;name&gt;url&lt;/name&gt;&lt;value&gt;&lt;string&gt;$1&lt;/string&gt;&lt;/value&gt;&lt;/member&gt;"</span></pre><pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     );</pre></div></div>
<p>Problem 2 solved.</p>
<p><strong>Problem 3</strong> - Character Encoding.</p>
<p>I've yet to confirm or work out exactly what's happening but it looks like the title of a post from Word 2007 uses a character set different to the body. More on that once I've worked it out.</p>
<p>In summary, as you might expect, writing code to work with Word 2007 is a major pain in the back-side. Give my Windows Live Writer any day!</p>
<p>I leave you with a photo of Felix uploaded via a newMediaObject call from WLW and formatted using the brilliant <a href="http://vista.gallery.microsoft.com/liveitemdetail.aspx?li=6a125986-6550-4ce9-9c71-9a0fbbc3443f&amp;pl=8&amp;bt=9">Polaroid picture plugin</a>.</p>
<p></p>
<div class="wlWriterSmartContent" id="scid:8747F07C-CDE8-481f-B0DF-C6CFD074BF67:93ecbc02-527c-4db6-ac08-a122140223aa" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><img border="0" src="http://www.codestore.net/store.nsf/rsrc/8D04E465791D15CB862574880033A06D/$file/IMG_1552_12.png" /></div>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080716?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080716</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080716</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080716?Open#comments</comments>
			<slash:comments>0</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080716</wfw:commentRss>
		</item>
		<item>
			<title>Test: Blogging From Windows Live Writer | Blog</title>
			<pubDate>Mon, 14 Jul 2008 09:32:14 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>For years now I've composed the blog entries that appear on this site using <a href="http://www.wbloggar.com/">w.bloggar</a>. The process relies on an XML-RPC processing agent in this database which handles requests posted to it that are based on the Blogger API. This lets me create and edit blog entries without me needing to open a browser or the Notes client. This is something I <a href="http://www.codestore.net/store.nsf/unid/BLOG-20030609?OpenDocument">talked about more than five years ago</a>! Damn.</p> <p>While the process works it has its shortcomings and five years on I've finally got round to improving how I post. Wbloggar itself had promise but never really went anywhere and hasn't changed much in the time I've been using it.</p> <p>Blogging anything other than plain text has always meant opening a browser, logging in, finding the relevant "resource" document and uploading an image to it. Then I have to copy the link to the image and switch back to wbloggar where I then link to it form. It's enough of a pain to stop me uploading images unless I really need to.</p> <p>Then there's the fact you write in HTML. Not that I mind doing this but I'd rather WYSIWYG it. Then there's the spell checker, which is just plain awful. I could go on...</p> <p>So, I've now updated the XML-PRC agent (uses MetaWeblog API rather than Blogger) and, as of today, am switching to using Windows Live Writer (WLW). </p> <p>Now I can write without the HTML. I can insert inline images and have them automatically uploaded to a resource document when I press the Publish button in WLW. Spell checking works and is just like in Word with the squiggly lines). Life is so much easier now.</p> <p>&nbsp;<img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="444" alt="wlw" src="http://www.codestore.net/store.nsf/rsrc/A3BACB8BE1F2BED086257486004FDAF5/$file/wlw_6.gif" width="550" border="0"> </p> <p>Until now I've stored ideas for future blog postings in .post files which open with wbloggar. I've got them scattered all over the place. Like any type of file you create them and forget they're there until they're no longer relevant. I must have not posted loads of stuff just because I forgot about the idea I stored in a .post file somewhere.</p> <p>WLW stores your drafts nice and tidy in its own folder and displays them to you in a manageable fashion so can easily edit and post them at any point.</p> <p>I tell you all this as what I'm getting at is that this is another change I've made that I'm hoping will make it easier for me to write here on a more timely basis. I wanted to test the theory too. Hence the screengrab above!</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080714?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080714</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080714</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080714?Open#comments</comments>
			<slash:comments>8</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080714</wfw:commentRss>
		</item>
		<item>
			<title>It's Make Your Own Caption Time | Blog</title>
			<pubDate>Tue, 8 Jul 2008 02:13:11 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p><img src="http://www.codestore.net/store.nsf/rsrc/bloggifs40/$file/young.jpg" title="" width="550" height="466" border="0" hspace="5" vspace="5"></p>

<p>Yes, that's Felix. Yes, that's a screwdriver. Yes, that's the only working network switch I've got.</p>

<p>You can see why I never leave him in my office on his own!</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080708?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080708</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080708</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080708?Open#comments</comments>
			<slash:comments>21</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080708</wfw:commentRss>
		</item>
		<item>
			<title>RSS Comment Feeds -- Both Per Entry and For The Whole Site + Some Other RSS Mods Too. | Blog</title>
			<pubDate>Mon, 7 Jul 2008 03:22:41 -0500</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>If you look at the source code of this page you'll see a comment in the head section:</p>

<code>&lt;!-- Codestore.net, Version 6.4 [29 June 2006] // --&gt;</code>

<p>As you can see it's been over two years since I made any significant change to the make-up of this site. Being one who likes to think he keeps up with &mdash; if not ahead of &mdash; the ever-changing times in the web world it's obvious I've let things slip. While I still try and keep up with things it's just not reflected in the design of this site. It's high time for change!</p>

<p>One area in which the site has been woefully lacking is its RSS feeds, as was highlighted in the discussions last week. What existed was the minimum. Nothing more than was enough to alert you guys of new blogs/articles. It was down to you to decide it was worth the visit to read an item, based on the title. Possibly it was my own arrogance that assumed you'd <i>always</i> want to.</p>

<p>In response to user "demand" last week I ate a slice of humble pie and added full content to the <a href="http://www.codestore.net/store.nsf/rss.xml">main feed</a>. In doing so a whole can of worms was opened and I've since added a couple of other feeds as well as making a couple of enhancements to the existing one. The RSS feeds on this site are now a hell of a lot more useful than they were this time last week. Codestore's back on the cutting edge of things!</p>

<p>Often what you guys post on here is as of much use (sometimes more so) than what I have to say. If not then it certainly compliments what I am saying and is definitely worth your attention. The trouble with comments on here (on all blogs for that matter) is that it's rarely a discussion and more often a passing remark from a user who's unlikely to return and reply to a reply.</p>

<p>To address this I've added a <a href="http://www.codestore.net/store.nsf/comments.xml">feed of all comments</a> posted. This should make it easier to track who is saying what and to see whether things have changed since you last posted and hence whether it's worth your returning to the table.</p>

<p>Here's what the comments feed looks like in FeedDemon:</p>

<p><img src="http://www.codestore.net/store.nsf/rsrc/bloggifs40/$file/rssallcomments.gif" title="" width="550" height="414" border="0" hspace="5" vspace="5"></p>

<p>Notice the "view" has columns for what the reply is to as well as columns for who and when.</p>

<p>While I was at it I made some tweaks to the main feed to help with following comments. I added a <a href="http://developer.mozilla.org/en/docs/RSS:Article:Why_Well-Formed_Web_RSS_Module_is_Popular_-_Syndicating_Your_Comments">wfw:commentRss</a> element to each item as well as a <a href="http://developer.mozilla.org/en/docs/RSS:Article:Why_RSS_Slash_is_Popular_-_Counting_Your_Comments">slash:comments</a> element, which tells readers where the feed for comments to the current item is and how many comments there currently are, respectively.</p>

<p>How this works for you depends on what feed reader you use. For most of you it won't make a difference. If you use FeedDemon then the main feed now has two new icons in each entry, like so:</p>

<p><img src="http://www.codestore.net/store.nsf/rsrc/bloggifs40/$file/linkstocomments.gif" title="" width="446" height="485" border="0" hspace="5" vspace="5"></p>

<p>Clicking the icon with the (2) next to in the first example would take you straight down to the comments section of the blog entry on this site so you could read the two comments (although if it says (0) next to it you now know not to bother!). Clicking the RSS icon next to it would have FeedDemon subscribe to a feed which contains just comments to the current entry.</p>

<p>In adding feeds for comments I had to choose whether to have individual feeds for each entry or one for all comments on all entries. Although I was in no doubt that one central feed was the way to go I also felt there would be occasions when an individual feed would suit better..</p>

<p>So, you can either subscribe to <a href="http://www.codestore.net/store.nsf/comments.xml">all comments</a> or, for example, <a href="http://www.codestore.net/store.nsf/blog.xml?Open=20080707">all comments posted to this entry</a>.</p>

<p>To help you and new users subscribe I've added auto-discovery to the site for all the feeds, as well as an extra link in the footer for the comments feed. If you open a blog entry there's also auto-discovery for its own feed as well as a subscribe link in the "sidebar".</p>

<p>If you're another blogger or site owner and wondering how the new RSS functions either ask or take a peek at the RSS itself. None of it's rocket science. For the rest of you I hope you agree it makes it all a lot easier to follow what's going on?</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080707?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080707</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080707</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080707?Open#comments</comments>
			<slash:comments>3</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080707</wfw:commentRss>
		</item>
		<item>
			<title>Links of Interest Section Has Been Resurrected  | Blog</title>
			<pubDate>Fri, 4 Jul 2008 04:30:11 -0400</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>Another change I made to this site recently, which I doubt many of you noticed, is the resurrection of my "elsewhere" links. Both the displayed section and the feed.</p>

<p>"Elsewheres" are nothing more than links to other pages on the internet that I found interesting and think you might like too. They first appeared on this site in January 2005. From then onwards they appeared in the yellow-looking sidebar on the homepage, in <a href="http://www.codestore.net/store.nsf/externals">their own view</a> and also on the blog document for the day on which I linked to them. They also had <a href="http://www.codestore.net/store.nsf/links.xml">their own feed</a>. </p>

<p>Then, last September, I <a href="http://www.codestore.net/store.nsf/unid/BLOG-20070924?OpenDocument">discovered the use of FeedDemon's News Bins</a>. Since then I've still been bookmarking useful pages, just not actually on codestore, but in <a href="http://services.newsgator.com/ngws/svc/ClippingsRSS.aspx?uid=62859&fid=4047759">this feed</a>, as it's so much quicker and easier to drag to the News Bin than to login in here and create documents in this site. I'm assuming some of you subscribe to that feed? If not it's still useful for me personally as an online bookmarking system.</p>

<p>I'd always meant to remove the elsewhere section from the homepage but never got round to it. This made the homepage look stagnant as the last date showing was September 2007. That's not good in webland, is it now! </p>

<p>So, what I've done is write a little scheduled (hourly) Java agent to download the "news bin" and create "elsewhere" documents on this site. Thus keeping that part of codestore alive and kicking.</p>

<p class="sidePanel">If you're interested in how the scheduled agent works <a href="http://www.codestore.net/store.nsf/rsrc/bloggifs40/$file/externals.java">here's the code.</a></p>

<p>If you're interested in what I'm interested in then you might want to see the links I, errr, link to. To do this you have three options:</p>

<ol>
<li>Simplest option is to subscribe to <a href="http://services.newsgator.com/ngws/svc/ClippingsRSS.aspx?uid=62859&fid=4047759">the Newsgator feed</a>.</li>
<li>Alternatively you can subscribe to <a href="http://www.codestore.net/store.nsf/links.xml">the feed on this site</a> which is an hour out of sync.</li>
<li>You can visit this site and see them on the right hand side of the homepage. Note that you can also search them on this site to find links you thought you saw at some point (I know I do that still).</li>
</ol>

<p>So there you have it. Another little change which will hopefully help revive this site a little and is another step towards Codestore v7 (this is 6.5 you're looking at - what, you mean you didn't know that!?).</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080704?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080704</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080704</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080704?Open#comments</comments>
			<slash:comments>2</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080704</wfw:commentRss>
		</item>
		<item>
			<title>Codestore's RSS Feed Now Has Full Content | Blog</title>
			<pubDate>Thu, 3 Jul 2008 04:58:34 -0400</pubDate>
			<author>Jake Howlett</author>
			<description><![CDATA[ <p>This one is especially for Tim Tripcony and anybody else who prefers to remain in their feed-reader while catching up on new postings on their favourite sites.</p>

<p>Until today on codestore you had to actually visit the site if you wanted to read my posting. If you were lucky I'd have remembered to add a one-liner summary to try and tempt you in, but often all you had to go on was the title itself.</p>

<p>The trouble with using the title alone is that (at least I find) it's almost impossible to come up with one that summarises it all in a catchy way. I spend way to much time obsessing over the title of a post sometimes - changing words over and over.</p>

<p>Well now, due to popular demand (you can probably tell if you've got this far and you're still in <a href="http://reader.google.com">Google Reader</a> or the likes) I've supplied the full body of the blog entry via RSS. Unless you want to post a comment (for which I given you a handy "button" to press at the bottom of each item) there's no actual need to visit the site.</p>

<p>So, why has it taken me so long to make this change? The answer's in the last paragraph -- that you don't need to visit the site. My concern with full-content RSS feeds is that my visitors never actually, err, visit. This means they never get to see the site I put so much time in to designing. Purely selfish, I know and no reason to force people to visit. </p>

<p>The obvious side effect to this is that I lose visitors who don't like taking the gamble that something is worth their time to read based on what the title tells them. Hence my about turn. I might as well get the content I write to as many people as possible hadn't I?!</p>

<p>There was another, more practical, reason not to supply full content. All the internal links in my blogs are relative to the <a href="http://www.codestore.net/store.nsf/unid/EPSD-52UQZJ?OpenDocument">BASE href tag</a> in the page's Head. Likewise for inline images. Links start with "http://www.codestore.net/store.nsf/unid/" and images with "http://www.codestore.net/store.nsf/rsrc/" both of which are the names of sorted views.</p>

<p>The trouble is that once downloaded to the RSS feed it doesn't know what the BASE href is and so links and inline resource files become broken. Take the link in the last paragraph for example. If you examine it on the site itself you'll see it points to unid/EPSD-52UQZJ?OpenDocument. If you examine the link in the RSS feed you'll see it points directly to http://www.codestore.net/store.nsf/unid/EPSD-52UQZJ?OpenDocument.</p>

<p>So how did I got about this without using nasty hard-coded absolute links in the actual stored content? 

<p>All I did was add an @ReplaceSubstring() to the RSS view. Blog posts on this site are just HTML stored in a plain old text field. All I needed to add to the RSS feed's view was this:</p>

<pre class="code">
@<span class="TPkeyword1">ReplaceSubstring</span><span class="TPbracket">(</span>
        @<span class="TPkeyword1">Implode</span><span class="TPbracket">(</span>Body; @<span class="TPkeyword1">NewLine</span><span class="TPbracket">)</span>;
        <span class="TPstring">"=\&quot;rsrc/"</span><span class="TPoperator">:</span><span class="TPstring">"=\&quot;unid/"</span>; 
        <span class="TPstring">"=\"http://www.codestore.net/store.nsf/rsrc/"</span><span class="TPoperator">:</span><span class="TPstring">"\"http://www.codestore.net/store.nsf/unid/"</span>
<span class="TPbracket">)</span>;
</pre>

<p>It seems safe to assume that any occurrence of the strings ="http://www.codestore.net/store.nsf/rsrc/" or ="http://www.codestore.net/store.nsf/unid/" are either a link or an image, respectively. Seems foolproof to me and, more importantly, it works. To prove it here's an image, which just happens to be an image of what the feed now looks like in FeedDemon:</p>

<p><img src="http://www.codestore.net/store.nsf/rsrc/bloggifs40/$file/feeddemon.gif" title="" width="480" height="478" border="0" hspace="5" vspace="5"></p>

<p>Notice the preview image of the laptop that FeedDemon provides when the item is collapsed. All very cool.</p>

<p>So I hope we're all happy now? If you have any more requests just ask.</p>
<p><a href="http://www.codestore.net/store.nsf/unid/BLOG-20080703?open#post"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p> 		]]></description>
			<link>http://www.codestore.net/store.nsf/unid/BLOG-20080703</link>
			<guid isPermaLink="true">http://www.codestore.net/store.nsf/unid/BLOG-20080703</guid>
			<comments>http://www.codestore.net/store.nsf/unid/BLOG-20080703?Open#comments</comments>
			<slash:comments>19</slash:comments>
			<wfw:commentRss>http://www.codestore.net/store.nsf/blog.xml?Open=20080703</wfw:commentRss>
		</item>


	</channel>
</rss> 
