<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Snippets code from my daily experience &#187; xpcom</title>
	<atom:link href="http://dafizilla.wordpress.com/category/xpcom/feed/" rel="self" type="application/rss+xml" />
	<link>http://dafizilla.wordpress.com</link>
	<description>Just another unnecessary code resource blog</description>
	<lastBuildDate>Sun, 20 Dec 2009 10:00:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='dafizilla.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/635b338f35d7304cae2e1b31926d3592?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Snippets code from my daily experience &#187; xpcom</title>
		<link>http://dafizilla.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dafizilla.wordpress.com/osd.xml" title="Snippets code from my daily experience" />
		<item>
		<title>Adding CSS Color Preview Tooltip to Komodo</title>
		<link>http://dafizilla.wordpress.com/2009/03/01/adding-css-color-preview-tooltip-to-komodo/</link>
		<comments>http://dafizilla.wordpress.com/2009/03/01/adding-css-color-preview-tooltip-to-komodo/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 11:36:12 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[komodo]]></category>
		<category><![CDATA[nsIDOMCSSPrimitiveValue]]></category>
		<category><![CDATA[openkomodo]]></category>
		<category><![CDATA[scintilla]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=545</guid>
		<description><![CDATA[Do you know Firebug? Uh no? Well please make a jump in twentieth century then return here  
Firebug has many great features but I love the color preview tooltip, from CSS Tab moving the mouse over a CSS color expression you will see a little box filled with the color found under the mouse [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=545&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Do you know <a href="http://getfirebug.com/">Firebug</a>? Uh no? Well please make a jump in twentieth century then return here <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Firebug has many great features but I love the <a href="http://getfirebug.com/css.html">color preview tooltip</a>, from CSS Tab moving the mouse over a CSS color expression you will see a little box filled with the color found under the mouse pointer.</p>
<p>Every time I edit CSS (and HTML) files from Komodo subconsciously I move mouse over a color waiting to see the tooltip but nothing happens <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>I&#8217;ve realized a macro can do this job so I&#8217;ve written <a href="http://dafizilla.sourceforge.net/stuff/macros/ColorInfoTip.kpz">ColorInfoTip</a> that adds to Komodo the ability to show colored tooltip.</p>
<p><img class="aligncenter" src="http://apps.sourceforge.net/mediawiki/dafizilla/nfs/project/d/da/dafizilla/b/bd/ColorInfoTipPreview.jpg" alt="" width="402" height="148" /></p>
<h3>Some technical detail</h3>
<p><em>This is a macro! No need to create extensions, the Komodo macro <strong>ecosystem</strong> is very cool and powerful.</em></p>
<p>The tooltip is a scintilla <a href="http://www.scintilla.org/ScintillaDoc.html#CallTips">Call tip</a> accessible from Komodo API.</p>
<p>The CSS color string can be written using many <a href="http://www.w3.org/TR/CSS2/syndata.html#color-units">syntaxes</a> like #RRGGBB or rgb(R,G,B) instead of reinventing the wheel and write the parser I&#8217;ve used the <a href="http://www.xulplanet.com/references/objref/CSSPrimitiveValue.html#method_getRGBColorValue">getRGBColorValue</a> standard DOM method.</p>
<p>I discovered <a href="http://www.scintilla.org/ScintillaDoc.html">Scintilla</a> uses BBGGRR color format instead of RRGGBB so the <a href="http://www.xulplanet.com/references/objref/CSSRGBColor.html">CSSRGBColor</a> components have been converted to be Scintilla compliant.</p>
<h3>Known problems</h3>
<p>The macro isn&#8217;t perfect and any help is welcomed</p>
<ul>
<li>Sometimes the tooltip doesn&#8217;t close especially changing editor view</li>
<li><span style="text-decoration:line-through;">Moving mouse quickly doesn&#8217;t update the color</span> (fixed)</li>
<li>fill here the bug you found</li>
</ul>
<h3>ColorInfoTip.kpz</h3>
<p>You can download the macro from <a href="http://dafizilla.sourceforge.net/stuff/macros/ColorInfoTip.kpz">ColorInfoTip.kpz</a> then open the file from Komodo to install</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/545/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/545/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/545/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=545&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2009/03/01/adding-css-color-preview-tooltip-to-komodo/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>

		<media:content url="http://apps.sourceforge.net/mediawiki/dafizilla/nfs/project/d/da/dafizilla/b/bd/ColorInfoTipPreview.jpg" medium="image" />
	</item>
		<item>
		<title>Posting syntax highlighted code on wordpress.com using Komodo macro</title>
		<link>http://dafizilla.wordpress.com/2009/01/20/posting-syntax-highlighted-code-on-wordpresscom-using-komodo-macro/</link>
		<comments>http://dafizilla.wordpress.com/2009/01/20/posting-syntax-highlighted-code-on-wordpresscom-using-komodo-macro/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 13:30:23 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[clipboard]]></category>
		<category><![CDATA[koIFileEx]]></category>
		<category><![CDATA[koIFileService]]></category>
		<category><![CDATA[koScintillaSchemeService]]></category>
		<category><![CDATA[komodo]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[nsIClipboard]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=481</guid>
		<description><![CDATA[Soon or later any blogger talking about software development will post some snippet of code.
To make code more cool and attractive he/she will use syntax highlight.
There are many alternatives for many blog platforms like Pygments, GeSHI, CodeHighlighter, WP-Syntax and so on.
This blog is hosted on the free version of WordPress.com, it doesn&#8217;t allow to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=481&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Soon or later any blogger talking about software development will post some snippet of code.</p>
<p>To make code more cool and attractive he/she will use syntax highlight.</p>
<p>There are many alternatives for many blog platforms like <a href="http://pygments.org/">Pygments</a>, <a href="http://qbnz.com/highlighter/">GeSHI</a>, <a href="http://wordpress.org/extend/plugins/code-highlighter/">CodeHighlighter</a>, <a href="http://wordpress.org/extend/plugins/wp-syntax/">WP-Syntax</a> and so on.</p>
<p>This blog is hosted on the <strong>free </strong>version of <a href="http://wordpress.com/">WordPress.com</a>, it doesn&#8217;t allow to use any plugin or user-defined CSS so adding <strong><em>sexy</em> </strong>code is very difficult.</p>
<p>Komodo has the ability to <a href="http://docs.activestate.com/komodo/5.0/files.html#files_printhtml">print to HTML files</a> code with the syntax highlighted, this feature is fully accessible from APIs so I&#8217;ve written a macro that</p>
<ul>
<li>make CSS style inline replacing HTML class with corresponding style attributes</li>
<li>copy to clipboard (using the new Komodo 5 clipboard helper library) in HTML format so user can paste directly on Visual WordPress mode</li>
</ul>
<p>Below you find the macro source code obviously highlighted by itself <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<h3>How to get the selected text (or the whole Komodo view) converted to HTML</h3>
<p>The variable str at end contains the converted HTML</p>
<pre><span style="font-size:12px;"><span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">view</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">ko</span><span style="color:#781f87;">.</span><span class="identifiers">views</span><span style="color:#781f87;">.</span><span class="identifiers">manager</span><span style="color:#781f87;">.</span><span class="identifiers">currentView</span><span style="color:#781f87;">;</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">tmpFileSvc</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@activestate.com/koFileService;1"</span><span style="color:#781f87;">]</span>
<span class="default">                 </span><span style="color:#781f87;">.</span><span class="identifiers">getService</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">koIFileService</span><span style="color:#781f87;">)</span>
<span class="identifiers">fname</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">tmpFileSvc</span><span style="color:#781f87;">.</span><span class="identifiers">makeTempName</span><span style="color:#781f87;">(</span><span style="color:#23238e;">".html"</span><span style="color:#781f87;">);</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">lang</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">view</span><span style="color:#781f87;">.</span><span class="identifiers">document</span><span style="color:#781f87;">.</span><span class="identifiers">languageObj</span><span style="color:#781f87;">;</span>
<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">forceColor</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span style="color:#871f78;">true</span><span style="color:#781f87;">;</span>
<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">selectionOnly</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">view</span><span style="color:#781f87;">.</span><span class="identifiers">selection</span><span class="default"> </span><span style="color:#781f87;">!=</span><span class="default"> </span><span style="color:#23238e;">""</span><span style="color:#781f87;">;</span>
<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">schemeService</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">'@activestate.com/koScintillaSchemeService;1'</span><span style="color:#781f87;">].</span><span class="identifiers">getService</span><span style="color:#781f87;">();</span>
<span class="identifiers">schemeService</span><span style="color:#781f87;">.</span><span class="identifiers">convertToHTMLFile</span><span style="color:#781f87;">(</span><span class="identifiers">view</span><span style="color:#781f87;">.</span><span class="identifiers">scimoz</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">view</span><span style="color:#781f87;">.</span><span class="identifiers">document</span><span style="color:#781f87;">.</span><span class="identifiers">displayPath</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">view</span><span style="color:#781f87;">.</span><span class="identifiers">document</span><span style="color:#781f87;">.</span><span class="identifiers">language</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">lang</span><span style="color:#781f87;">.</span><span class="identifiers">styleBits</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">view</span><span style="color:#781f87;">.</span><span class="identifiers">document</span><span style="color:#781f87;">.</span><span class="identifiers">encoding</span><span style="color:#781f87;">.</span><span class="identifiers">python_encoding_name</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">fname</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">selectionOnly</span><span style="color:#781f87;">,</span>
<span class="default">                                </span><span class="identifiers">forceColor</span><span style="color:#781f87;">);</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">file</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@activestate.com/koFileEx;1"</span><span style="color:#781f87;">]</span>
<span class="default">        </span><span style="color:#781f87;">.</span><span class="identifiers">createInstance</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">koIFileEx</span><span style="color:#781f87;">)</span>
<span class="identifiers">file</span><span style="color:#781f87;">.</span><span class="identifiers">URI</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">ko</span><span style="color:#781f87;">.</span><span class="identifiers">uriparse</span><span style="color:#781f87;">.</span><span class="identifiers">localPathToURI</span><span style="color:#781f87;">(</span><span class="identifiers">fname</span><span style="color:#781f87;">);</span>
<span class="identifiers">file</span><span style="color:#781f87;">.</span><span class="identifiers">open</span><span style="color:#781f87;">(</span><span style="color:#23238e;">'rb'</span><span style="color:#781f87;">);</span>
<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">str</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">file</span><span style="color:#781f87;">.</span><span class="identifiers">readfile</span><span style="color:#781f87;">();</span>
<span class="identifiers">file</span><span style="color:#781f87;">.</span><span class="identifiers">close</span><span style="color:#781f87;">();</span></span></pre>
<h3>Applying the replace to str</h3>
<p>Nothing really interesting, simply the replace method is called many times to make CSS style inline inside span tags</p>
<h3>Copy to clipboard in HTML format</h3>
<p>Komodo 5 allows to interact with clipboard wrapping XPCOM services, these APIs allow to copy in the so called HTML <a href="https://developer.mozilla.org/en/Using_the_Clipboard">flavor</a> so content preserves styles and colors.</p>
<pre><span style="font-size:12px;"><span class="identifiers">xtk</span><span style="color:#781f87;">.</span><span class="identifiers">include</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"clipboard"</span><span style="color:#781f87;">);</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">transferable</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">xtk</span><span style="color:#781f87;">.</span><span class="identifiers">clipboard</span><span style="color:#781f87;">.</span><span class="identifiers">addTextDataFlavor</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"text/html"</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">str</span><span style="color:#781f87;">);</span>
<span class="identifiers">transferable</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">xtk</span><span style="color:#781f87;">.</span><span class="identifiers">clipboard</span><span style="color:#781f87;">.</span><span class="identifiers">addTextDataFlavor</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"text/unicode"</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">str</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">transferable</span><span style="color:#781f87;">);</span>
<span class="identifiers">xtk</span><span style="color:#781f87;">.</span><span class="identifiers">clipboard</span><span style="color:#781f87;">.</span><span class="identifiers">copyFromTransferable</span><span style="color:#781f87;">(</span><span class="identifiers">transferable</span><span style="color:#781f87;">);</span>
</span></pre>
<h3>That&#8217;s all folks</h3>
<p>After running this macro on a Komodo view you can paste directly on WordPress Visual editor and obtain your beautiful code.</p>
<p>Using HTML flavor you can paste into any application able to accept Special Formats like Microsoft Word or OpenOffice Writer.</p>
<p>The full macro source code can be found on <a href="http://dafizilla.svn.sourceforge.net/viewvc/dafizilla/trunk/komodo/macros/Word&#112;ress.js?view=markup">Macro SVN repository</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/481/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/481/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/481/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=481&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2009/01/20/posting-syntax-highlighted-code-on-wordpresscom-using-komodo-macro/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>nsIProcess, Windows and Unicode</title>
		<link>http://dafizilla.wordpress.com/2008/10/08/nsiprocess-windows-and-unicode/</link>
		<comments>http://dafizilla.wordpress.com/2008/10/08/nsiprocess-windows-and-unicode/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 16:22:12 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[CreateProcessW]]></category>
		<category><![CDATA[IWinProcess]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nsIProcess]]></category>
		<category><![CDATA[nsIScriptableUnicodeConverter]]></category>
		<category><![CDATA[unicode]]></category>
		<category><![CDATA[utf-8]]></category>
		<category><![CDATA[viewsourcewith]]></category>
		<category><![CDATA[xpcom]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=173</guid>
		<description><![CDATA[ViewSourceWith (VSW for friends) existence was impossible without nsIProcess, VSW must run programs and pass them at least one file name.
When arguments passed to nsIProcess are ASCII strings all works like a charm but you enter the hell if strings contain Unicode characters like those contained in Cyrillic or Japanese alphabets.
nsIProcess, especially under Microsoft Windows, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=173&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://dafizilla.sourceforge.net/viewsourcewith/">ViewSourceWith</a> (VSW for friends) existence was impossible without <a href="http://developer.mozilla.org/en/NsIProcess">nsIProcess</a>, VSW must run programs and pass them at least one file name.</p>
<p>When arguments passed to <a href="http://developer.mozilla.org/en/NsIProcess">nsIProcess</a> are ASCII strings all works like a charm but you enter the hell if strings contain Unicode characters like those contained in Cyrillic or Japanese alphabets.</p>
<p><a href="http://developer.mozilla.org/en/NsIProcess">nsIProcess</a>, especially under Microsoft Windows, doesn&#8217;t work very well with UTF-8 strings (see bugs <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=229379">229379</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=408923">408923</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=411511">411511</a>).</p>
<p>On VSW forum an user <a href="http://sourceforge.net/forum/forum.php?thread_id=2228819&amp;forum_id=457474">asked to me</a> to fix the problem but it isn&#8217;t strictly related to VSW because the problem affects the XPCOM implementation.</p>
<p>After <a href="http://forums.mozillazine.org/viewtopic.php?f=19&amp;t=850765&amp;start=0&amp;st=0&amp;sk=t&amp;sd=a">many attempts</a> I surrendered and I decided to write my Win32 (Win64??) XPCOM component.</p>
<p>My <a href="http://dafizilla.svn.sourceforge.net/viewvc/dafizilla/xpcom/bin/winprocess/">IWinProcess</a> has the same nsIProcess&#8217;s method signatures (Init, Run) but accepts wstrings and calls the unicode <a href="http://msdn.microsoft.com/en-us/library/ms682425.aspx">CreateProcessW</a> Win32 API instead of its sibling <a href="http://msdn.microsoft.com/en-us/library/ms682425.aspx">CreateProcessA</a>.</p>
<p>The Javascript caller (eg VSW) must pass UTF-8 strings but this is the only constraint.<br />
Now finally I can open local files containing Unicode characters without tweaking the Windows &#8216;Regional Options&#8217;.</p>
<p>Linux seems to work fine (at least on my <a href="https://wiki.ubuntu.com/GutsyGibbon">Gutsy</a> box) simply converting Unicode strings with <a href="http://www.xulplanet.com/references/xpcomref/ifaces/nsIScriptableUnicodeConverter.html#method_ConvertFromUnicode">nsIScriptableUnicodeConverter.ConvertFromUnicode</a>, no other special workarounds.</p>
<p>I don&#8217;t know if MacOSX works like Linux, I&#8217;m unable to test under Apple machines.</p>
<p>I don&#8217;t like code containing platform checks (if Windows &#8230; else if Linux &#8230; ) but to simplify VSW development the &#8216;if&#8217; statement sounds reasonable.</p>
<p>The IWinProcess source and DLL are present on <a href="http://dafizilla.svn.sourceforge.net/viewvc/dafizilla/xpcom/">dafizilla SVN repository</a>.</p>
<p>The next VSW release (0.4) will contain the IWinProcess component</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=173&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/10/08/nsiprocess-windows-and-unicode/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>XPCOM components, extensions and Visual C++ Express</title>
		<link>http://dafizilla.wordpress.com/2008/10/04/xpcom-components-extensions-and-visual-c-express/</link>
		<comments>http://dafizilla.wordpress.com/2008/10/04/xpcom-components-extensions-and-visual-c-express/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 13:01:46 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[extension]]></category>
		<category><![CDATA[gecko]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[vc++]]></category>
		<category><![CDATA[xpcom]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=167</guid>
		<description><![CDATA[I&#8217;ve written a little XPCOM component that worked immediately thanks to the good tutorial written by Mark Finkle.
The extension stopped to work when I&#8217;ve installed it on computer different from my development environment, the error in console was
Failed to load XPCOM component: c:\Documents and Settings\&#8230;
The solution was to statically link the C/C++ runtime and add [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=167&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve written a little XPCOM component that worked immediately thanks to the good <a href="http://starkravingfinkle.org/blog/2006/10/mozilla-platform-xpcom-in-c/">tutorial</a> written by Mark Finkle.</p>
<p>The extension stopped to work when I&#8217;ve installed it on computer different from my development environment, the error in console was</p>
<blockquote><p>Failed to load XPCOM component: c:\Documents and Settings\&#8230;</p></blockquote>
<p>The solution was to statically link the C/C++ runtime and add msvcrt to nodefaultlib switch.</p>
<p><a href="http://www.microsoft.com/express/vc/">VC++ Express 2008</a> (or above??) users must set from Configuration Properties</p>
<ul>
<li>C/C++ -&gt; Code Generation -&gt; Runtime Library = Multi-threaded (/MT)</li>
<li>Linker -&gt; Input -&gt; Ignore Specific Library = MSVCRT.LIB</li>
</ul>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=167&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/10/04/xpcom-components-extensions-and-visual-c-express/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Using nsIObserverService.notifyObservers subject argument from Javascript</title>
		<link>http://dafizilla.wordpress.com/2008/09/27/using-nsiobserverservicenotifyobservers-subject-argument-from-javascript/</link>
		<comments>http://dafizilla.wordpress.com/2008/09/27/using-nsiobserverservicenotifyobservers-subject-argument-from-javascript/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 07:37:28 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[extension]]></category>
		<category><![CDATA[nsIObserverService]]></category>
		<category><![CDATA[xpcom]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=153</guid>
		<description><![CDATA[When a XUL extension developer needs to notify a global modification (ie not strictly related to a single document window) can use the nsIObserverService service, it is easy and well documented.
The notifyObservers method does the work, it accepts three parameters

subject
topic
someData

topic is a string containing the &#8220;command&#8221;, someData is a string specific for topic and can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=153&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When a XUL extension developer needs to notify a global modification (ie not strictly related to a single document window) can use the <a href="http://developer.mozilla.org/En/NsIObserverService">nsIObserverService</a> service, it is easy and well documented.</p>
<p>The notifyObservers method does the work, it accepts three parameters</p>
<ul>
<li><strong>subject</strong></li>
<li><strong>topic</strong></li>
<li><strong>someData</strong></li>
</ul>
<p><strong>topic</strong> is a string containing the &#8220;command&#8221;, <strong>someData</strong> is a string specific for topic and can be null (read more at <a href="http://developer.mozilla.org/En/NsIObserverService">MDC docs</a>).</p>
<p>The <strong>subject</strong> argument can contain a pointer to application data, not only a simple string but a complex object.</p>
<p>The <strong>subject</strong> argument can be very useful to pass informations from notifier to callback function but using it from extension can be a bit complicated because it requires the presence of the <a href="http://developer.mozilla.org/En/WrappedJSObject">wrappedJSObject</a> property.</p>
<p>I never used <strong>subject</strong>&#8217;s notifyObservers parameter, I&#8217;ve always set it to null but on my last <a href="http://dafizilla.sourceforge.net/morekomodo/index.php">MoreKomodo</a> release I&#8217;ve tried to use it discovering my usage was unsuccessful without <a href="http://developer.mozilla.org/En/WrappedJSObject">wrappedJSObject</a>.</p>
<p>The correct usage requires you declare a <a href="http://developer.mozilla.org/En/WrappedJSObject">wrappedJSObject</a> property inside your data referring to itself <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /> </p>
<p><span style="color:#871f78;">var</span> data <span style="color:#871f78;">= {</span><br />
document <span style="color:#871f78;">:</span> viewDoc<span style="color:#871f78;">,</span><br />
newDocument <span style="color:#871f78;">:</span> newDoc<span style="color:#871f78;">,</span><br />
command <span style="color:#871f78;">:</span> <span style="color:#23238e;">&#8220;rename&#8221;</span><br />
<span style="color:#871f78;">};</span></p>
<p>data.wrappedJSObject <span style="color:#871f78;">=</span> data<span style="color:#871f78;">;</span></p>
<p>then call notifyObservers passing it into first parameter (<strong>subject</strong>)</p>
<p>Components.classes<span style="color:#871f78;">[</span><span style="color:#23238e;">"@mozilla.org/observer-service;1"</span><span style="color:#871f78;">]</span><br />
.getService<span style="color:#871f78;">(</span>Components.interfaces.nsIObserverService<span style="color:#871f78;">)</span><br />
.notifyObservers<span style="color:#871f78;">(</span>data<span style="color:#871f78;">,</span> <span style="color:#23238e;">&#8220;morekomodo_command&#8221;</span><span style="color:#871f78;">, null);</span></p>
<p>The observe callback must &#8220;unwrap&#8221; received <strong>subject</strong> to access to user defined properties</p>
<p>observe : <span style="color:#871f78;">function(</span>subject<span style="color:#871f78;">,</span> topic<span style="color:#871f78;">,</span> data<span style="color:#871f78;">) {</span><br />
<span style="color:#871f78;"> switch (</span>topic<span style="color:#871f78;">) {</span><br />
<span style="color:#871f78;"> case</span> <span style="color:#23238e;">&#8220;morekomodo_command&#8221;</span><span style="color:#871f78;">:</span><br />
<span style="color:#871f78;"> var</span> unwrapped<span style="color:#871f78;"> =</span> subject.wrappedJSObject<span style="color:#871f78;">;</span><br />
&#8230;<br />
&#8230;</p>
<p><span style="color:#871f78;">var</span> doc <span style="color:#871f78;">=</span> unwrapped.document<span style="color:#871f78;">;</span><br />
<span style="color:#871f78;"> break;<br />
}<br />
},</span></p>
<p>Another little lesson learned <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=153&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/09/27/using-nsiobserverservicenotifyobservers-subject-argument-from-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Open a tab using FUEL on Firefox 3</title>
		<link>http://dafizilla.wordpress.com/2008/06/29/open-a-tab-using-fuel-on-firefox-3/</link>
		<comments>http://dafizilla.wordpress.com/2008/06/29/open-a-tab-using-fuel-on-firefox-3/#comments</comments>
		<pubDate>Sun, 29 Jun 2008 15:41:15 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[fuel]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[nsIIOService]]></category>
		<category><![CDATA[xpcom]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=61</guid>
		<description><![CDATA[I want to migrate to Firefox 3 and stop compatibility with FF2.x so I&#8217;m starting to use intensively FUEL.
Today I&#8217;ve replaced the old &#8220;open new tab&#8221; code shown below
newTab : function (url) {
const newTab = getBrowser().addTab(url);
getBrowser().selectedTab = newTab;
}
With the FUEL version
newTab : function (url) {
var uri = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService)
.newURI(url, null, null);
Application.activeWindow.open(uri);
}
Onestly I found so complicated the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=61&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I want to migrate to Firefox 3 and stop compatibility with FF2.x so I&#8217;m starting to use intensively <a href="http://developer.mozilla.org/en/docs/FUEL">FUEL</a>.</p>
<p>Today I&#8217;ve replaced the old &#8220;open new tab&#8221; code shown below</p>
<p>newTab : function (url) {<br />
const newTab = getBrowser().addTab(url);<br />
getBrowser().selectedTab = newTab;<br />
}</p>
<p>With the FUEL version</p>
<p>newTab : function (url) {<br />
var uri = Components.classes["@mozilla.org/network/io-service;1"]<br />
.getService(Components.interfaces.nsIIOService)<br />
.newURI(url, null, null);<br />
Application.activeWindow.open(uri);<br />
}</p>
<p>Onestly I found so complicated the FUEL approach.</p>
<p>Why I need to create an URI?</p>
<p>Why <a href="http://developer.mozilla.org/en/docs/FUEL:Window#open.28.29">open</a> doesn&#8217;t work with a simple string?</p>
<p>BTW FUEL is great</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/61/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/61/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=61&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/06/29/open-a-tab-using-fuel-on-firefox-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>How to detect XUL trees scroll event</title>
		<link>http://dafizilla.wordpress.com/2008/05/09/how-to-detect-xul-trees-scroll-event/</link>
		<comments>http://dafizilla.wordpress.com/2008/05/09/how-to-detect-xul-trees-scroll-event/#comments</comments>
		<pubDate>Fri, 09 May 2008 17:17:56 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[DOMAttrModified]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[nsITreeView]]></category>
		<category><![CDATA[visualdiffer]]></category>
		<category><![CDATA[xpcom]]></category>
		<category><![CDATA[xul]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[scrolling]]></category>
		<category><![CDATA[tree]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=54</guid>
		<description><![CDATA[My extension VisualDiffer contains two nsITreeViews that must synchronize scrolling, when user scrolls one the other tree moves the selection to the corresponding row.
Apparently XUL trees don&#8217;t have any event handler to intercept scrolling operations so I run the risk to became crazy.
After days spent to find a solution (using google) without result I&#8217;ve tried [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=54&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My extension <a href="http://dafizilla.sourceforge.net/visualdiffer/index.php">VisualDiffer</a> contains two <a href="http://www.xulplanet.com/references/xpcomref/ifaces/nsITreeView.html">nsITreeView</a>s that must synchronize scrolling, when user scrolls one the other tree moves the selection to the corresponding row.</p>
<p>Apparently XUL trees don&#8217;t have any event handler to intercept scrolling operations so I run the risk to became crazy.</p>
<p>After days spent to find a solution (using google) without result I&#8217;ve tried to use the <a href="http://www.xulplanet.com/references/elemref/ref_EventHandlers.html#attr_DOMAttrModified">DOMAttrModified</a> event and amazingly it worked.</p>
<p>First I add a listener to the tree (VisualDiffer adds listeners to left and right trees)</p>
<p>document.getElementById<span style="color:#871f78;">(</span><span style="color:#23238e;">&#8220;left-tree&#8221;</span><span style="color:#871f78;">)</span>.addEventListener<span style="color:#871f78;">(</span><span style="color:#23238e;">&#8220;DOMAttrModified&#8221;</span>,<br />
function<span style="color:#871f78;">(</span>event<span style="color:#871f78;">)</span> <span style="color:#871f78;">{</span> gFolderDiffer.onLeftScroll<span style="color:#871f78;">(</span>event<span style="color:#871f78;">)</span>;<span style="color:#871f78;">}</span>, <span style="color:#871f78;">false</span><span style="color:#871f78;">)</span>;</p>
<p>The onScroll simply checks if event.attrName is &#8220;curpos&#8221; and if it&#8217;s true the tree has been scrolled by user</p>
<p>onLeftScroll <span style="color:#871f78;">:</span> function<span style="color:#871f78;">(</span>event<span style="color:#871f78;">)</span> <span style="color:#871f78;">{</span> <span style="color:#871f78;"> if</span> <span style="color:#871f78;">(</span>event.attrName <span style="color:#871f78;">==</span> <span style="color:#23238e;">&#8220;curpos&#8221;</span><span style="color:#871f78;">)</span> <span style="color:#871f78;">{</span><br />
rightTreeView.treebox.scrollToRow<span style="color:#871f78;">(</span>leftTreeView.treebox.getFirstVisibleRow<span style="color:#871f78;">(</span><span style="color:#871f78;">)</span><span style="color:#871f78;">)</span>;<br />
<span style="color:#871f78;">}</span><br />
<span style="color:#871f78;">}</span></p>
<p>This solution works fine but maybe exists a better way&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/54/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/54/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=54&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/05/09/how-to-detect-xul-trees-scroll-event/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>How to detect the current active theme name on Firefox</title>
		<link>http://dafizilla.wordpress.com/2007/12/23/how-to-detect-the-current-active-theme-name-on-firefox/</link>
		<comments>http://dafizilla.wordpress.com/2007/12/23/how-to-detect-the-current-active-theme-name-on-firefox/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 16:42:58 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[gecko]]></category>
		<category><![CDATA[nsIPrefBranch]]></category>
		<category><![CDATA[skin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[xpcom]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/2007/12/23/how-to-detect-the-current-active-theme-name-on-firefox/</guid>
		<description><![CDATA[Sometime obtaining informations about components isn&#8217;t so quick, you must iterate over RDF, XML or call many API.
Sometime is very simple like get a pref string&#8230; well this time I&#8217;m lucky  
The pref general.skins.selectedSkin contains the current active theme name.
var currentThemeName = Components.classes['@mozilla.org/preferences-service;1']
.getService()
.QueryInterface(Components.interfaces.nsIPrefBranch)
.getCharPref("general.skins.selectedSkin");
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=35&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sometime obtaining informations about components isn&#8217;t so quick, you must iterate over RDF, XML or call many API.</p>
<p>Sometime is very simple like get a pref string&#8230; well this time I&#8217;m lucky <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>The pref general.skins.selectedSkin contains the current active theme name.</p>
<p><code>var currentThemeName = Components.classes['@mozilla.org/preferences-service;1']<br />
.getService()<br />
.QueryInterface(Components.interfaces.nsIPrefBranch)<br />
.getCharPref("general.skins.selectedSkin");</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=35&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2007/12/23/how-to-detect-the-current-active-theme-name-on-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Put in clipboard same content in multiple formats using XUL.</title>
		<link>http://dafizilla.wordpress.com/2007/08/18/put-in-clipboard-same-content-in-multiple-formats-using-xul/</link>
		<comments>http://dafizilla.wordpress.com/2007/08/18/put-in-clipboard-same-content-in-multiple-formats-using-xul/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 11:09:08 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[clipboard]]></category>
		<category><![CDATA[nsIClipboard]]></category>
		<category><![CDATA[nsISupportsString]]></category>
		<category><![CDATA[nsITransferable]]></category>
		<category><![CDATA[xpcom]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/2007/08/18/put-in-clipboard-same-content-in-multiple-formats-using-xul/</guid>
		<description><![CDATA[Copy plain text in clipboard can be obtained using code shown below.


Components.classes["@mozilla.org/widget/clipboardhelper;1"]

    .getService(Components.interfaces.nsIClipboardHelper)

    .copyString("&#60;font color=’#FF0000′&#62;Hello world&#60;/font&#62;");


Using this approach you can easily copy HTML text but&#8230; it remains plain text!
So if you copy the string &#60;font color=&#8217;#FF0000&#8242;&#62;Hello world&#60;/font&#62; inside OpenOffice Calc (or Microsoft Word) you don&#8217;t see the text &#8220;Hello world&#8221; in red but the plain HTML tag.
Copy data (not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=25&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Copy plain text in clipboard can be obtained using code shown below.</p>
<pre><span style="font-size:12px;">

<span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@mozilla.org/widget/clipboardhelper;1"</span><span style="color:#781f87;">]</span>

<span class="default">    </span><span style="color:#781f87;">.</span><span class="identifiers">getService</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">nsIClipboardHelper</span><span style="color:#781f87;">)</span>

<span class="default">    </span><span style="color:#781f87;">.</span><span class="identifiers">copyString</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"&lt;font color=’#FF0000′&gt;Hello world&lt;/font&gt;"</span><span style="color:#781f87;">);</span>

</span></pre>
<p>Using this approach you can easily copy HTML text but&#8230; it remains plain text!<br />
So if you copy the string <span style="color:#000000;"><strong>&lt;font color=&#8217;#FF0000&#8242;&gt;Hello world&lt;/font&gt;</strong></span> inside OpenOffice Calc (or Microsoft Word) you don&#8217;t see the text &#8220;<span style="color:#ff0000;">Hello world</span>&#8221; in red but the plain HTML tag.</p>
<p>Copy data (not necessary text) using a specific format requires <a href="http://www.xulplanet.com/references/xpcomref/ifaces/nsITransferable.html">nsITransferable</a>&#8217;s use.<br />
You specify the mime type and if destination application (where you paste the data) is able to understand the format the correct result appears.</p>
<p>The code below insert real HTML data into clipboard and when you paste for example in OpenOffice you see the colored text.</p>
<pre><span style="font-size:12px;">

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">textHtml</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span style="color:#23238e;">"&lt;font color='#FF0000'&gt;Hello world&lt;/font&gt;"</span><span style="color:#781f87;">;</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">xferable</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@mozilla.org/widget/transferable;1"</span><span style="color:#781f87;">]</span>

<span class="default">    </span><span style="color:#781f87;">.</span><span class="identifiers">createInstance</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">nsITransferable</span><span style="color:#781f87;">);</span>

<span class="identifiers">xferable</span><span style="color:#781f87;">.</span><span class="identifiers">addDataFlavor</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"text/html"</span><span style="color:#781f87;">);</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">htmlstring</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@mozilla.org/supports-string;1"</span><span style="color:#781f87;">]</span>

<span class="default">    </span><span style="color:#781f87;">.</span><span class="identifiers">createInstance</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">nsISupportsString</span><span style="color:#781f87;">);</span>

<span class="identifiers">htmlstring</span><span style="color:#781f87;">.</span><span class="identifiers">data</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">textHtml</span><span style="color:#781f87;">;</span>

<span class="identifiers">xferable</span><span style="color:#781f87;">.</span><span class="identifiers">setTransferData</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"text/html"</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">htmlstring</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">textHtml</span><span style="color:#781f87;">.</span><span class="identifiers">length</span><span class="default"> </span><span style="color:#781f87;">*</span><span class="default"> </span><span style="color:#8b0000;">2</span><span style="color:#781f87;">);</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">clipboard</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@mozilla.org/widget/clipboard;1"</span><span style="color:#781f87;">]</span>

<span class="default">    </span><span style="color:#781f87;">.</span><span class="identifiers">getService</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">nsIClipboard</span><span style="color:#781f87;">);</span>

<span class="identifiers">clipboard</span><span style="color:#781f87;">.</span><span class="identifiers">setData</span><span style="color:#781f87;">(</span><span class="identifiers">xferable</span><span style="color:#781f87;">,</span><span class="default"> </span><span style="color:#871f78;">null</span><span style="color:#781f87;">,</span>

<span class="default">        </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">nsIClipboard</span><span style="color:#781f87;">.</span><span class="identifiers">kGlobalClipboard</span><span style="color:#781f87;">);</span>

</span></pre>
<p>Consider you want be able to choose if text must be pasted like HTML or plain text, for example because some application can&#8217;t handle stylished code.<br />
Consider a plain text editor, it handles text not colorful HTML so you need the ability to paste based on destination application.<br />
It&#8217;s easy! You only need to add a new flavor to the code shown above</p>
<pre><span style="font-size:12px;">

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">plainText</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span style="color:#23238e;">"Hello world in plain"</span><span style="color:#781f87;">;</span>

<span class="identifiers">xferable</span><span style="color:#781f87;">.</span><span class="identifiers">addDataFlavor</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"text/unicode"</span><span style="color:#781f87;">);</span>

<span style="color:#871f78;">var</span><span class="default"> </span><span class="identifiers">unicodestring</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">classes</span><span style="color:#781f87;">[</span><span style="color:#23238e;">"@mozilla.org/supports-string;1"</span><span style="color:#781f87;">]</span>

<span class="default">    </span><span style="color:#781f87;">.</span><span class="identifiers">createInstance</span><span style="color:#781f87;">(</span><span class="identifiers">Components</span><span style="color:#781f87;">.</span><span class="identifiers">interfaces</span><span style="color:#781f87;">.</span><span class="identifiers">nsISupportsString</span><span style="color:#781f87;">);</span>

<span class="identifiers">unicodestring</span><span style="color:#781f87;">.</span><span class="identifiers">data</span><span class="default"> </span><span style="color:#781f87;">=</span><span class="default"> </span><span class="identifiers">plainText</span><span style="color:#781f87;">;</span>

<span class="identifiers">xferable</span><span style="color:#781f87;">.</span><span class="identifiers">setTransferData</span><span style="color:#781f87;">(</span><span style="color:#23238e;">"text/unicode"</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">unicodestring</span><span style="color:#781f87;">,</span><span class="default"> </span><span class="identifiers">plainText</span><span style="color:#781f87;">.</span><span class="identifiers">length</span><span class="default"> </span><span style="color:#781f87;">*</span><span class="default"> </span><span style="color:#8b0000;">2</span><span style="color:#781f87;">);</span></span></pre>
<p>Now text editors receive the string &#8220;Hello world in plain&#8221; without any formatting and rich editors receive a colored &#8220;Hello world&#8221;.<br />
Rich editors like OpenOffice Calc or Writer allow user to choose how to paste using the &#8220;Paste special&#8221; function.<br />
You can choose to paste the same data in different format or different data per different format.</p>
<p><a href="http://dafizilla.sourceforge.net/table2clip/index.php">Table2Clipboard</a> uses two flavors, you can take a look at its source code <a href="http://dafizilla.svn.sourceforge.net/viewvc/dafizilla/trunk/table2clipboard/src/main/content/t2c/t2cOverlay.js?revision=13&amp;view=markup#l_87">here</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=25&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2007/08/18/put-in-clipboard-same-content-in-multiple-formats-using-xul/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Short-circuits, innocent code and nsIDOMEvent targets</title>
		<link>http://dafizilla.wordpress.com/2007/07/07/short-circuits-innocent-code-and-nsidomevent-targets/</link>
		<comments>http://dafizilla.wordpress.com/2007/07/07/short-circuits-innocent-code-and-nsidomevent-targets/#comments</comments>
		<pubDate>Sat, 07 Jul 2007 16:08:55 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[flock]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[xpcom]]></category>
		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/2007/07/07/short-circuits-innocent-code-and-nsidomevent-targets/</guid>
		<description><![CDATA[ An user on AMI tells me that my bonsai RichFeedButton doesn&#8217;t work when installed together with another extension.
I install the offended extension and discover that RichFeedButton breaks this little jewel!
The solution was simple but the bug hunting was hard  
The problem was into an innocent function associated with a listener that simply checks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=24&subd=dafizilla&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> An user on <a href="http://forum.addonsmirror.net/index.php?s=&amp;showtopic=6795&amp;view=findpost&amp;p=25881">AMI</a> tells me that my bonsai <a href="http://dafizilla.sourceforge.net/richfeedbutton/index.php">RichFeedButton</a> doesn&#8217;t work when installed together with another extension.</p>
<p>I install the offended extension and discover that RichFeedButton breaks this little <a href="http://dafizilla.wordpress.com/wp-admin/Organize%20Search%20Engines%20">jewel</a>!</p>
<p>The solution was simple but the bug hunting was hard <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>The problem was into an innocent function associated with a <a href="http://www.xulplanet.com/references/objref/XULElement.html#method_addEventListener">listener</a> that simply checks the <a href="http://www.xulplanet.com/references/xpcomref/ifaces/nsIDOMEvent.html">nsIDOMEvent</a>&#8217;s target id and attrName as shown below<br />
<code>if (<font color="#ff0000">event.target.id == "xxx"</font> &amp;&amp; <font color="#3366ff">event.attrName == "yyy"</font>) {</code><br />
<code>...</code><br />
<code>}</code></p>
<p><code></code><br />
For some motivations the &#8220;event.target&#8221; expression <em>breaks </em>the other extension.</p>
<p>I suspect event.target at some event stage isn&#8217;t valid and generates internally some error corrupting (???) the full event queue or simply I&#8217;m a bad programmer <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>The solution??</p>
<p>Simply swaps first equality test with second one</p>
<p><code>if (<font color="#3366ff">event.attrName == "yyy"</font> &amp;&amp; <font color="#ff0000">event.target.id == "xxx"</font>) {</code><br />
<code>...</code><br />
<code>} </code></p>
<p><code></code><br />
The javascript <a href="http://en.wikipedia.org/wiki/Minimal_evaluation">short-circuit evaluation</a> ensures me event.target.id is parsed only if first condition is true. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Every day I learn something about XUL and its implementation&#8230; <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=24&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2007/07/07/short-circuits-innocent-code-and-nsidomevent-targets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5759d7f64a710425e4ab730ba7a8311e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
	</channel>
</rss>