<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Snippets code from my daily experience</title>
	<atom:link href="http://dafizilla.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dafizilla.wordpress.com</link>
	<description>Just another unnecessary code resource blog</description>
	<pubDate>Tue, 01 Jul 2008 16:23:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Determine if the current view is a macro in Komodo</title>
		<link>http://dafizilla.wordpress.com/2008/07/01/determine-if-the-current-view-is-a-macro-in-komodo/</link>
		<comments>http://dafizilla.wordpress.com/2008/07/01/determine-if-the-current-view-is-a-macro-in-komodo/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 16:23:26 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[komodo]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=62</guid>
		<description><![CDATA[Komodo allows to edit macros in editor windows, this feature simplifies the macro code writing.
Do you need to know if you are editing a macro? Well You must fight with koIPart interface.
After digging into Komodo IDLs I found a way to know if current view is a macro, take a look at code shown below.
var [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Komodo allows to edit macros in editor windows, this feature simplifies the macro code writing.</p>
<p>Do you need to know if you are editing a macro? Well You must fight with <a href="http://grok.openkomodo.com/source/xref/openkomodo/trunk/src/projects/koIProject.unprocessed.idl">koIPart</a> interface.</p>
<p>After digging into Komodo IDLs I found a way to know if current view is a macro, take a look at code shown below.</p>
<p>var currView = ko.views.manager.currentView;<br />
var fileURL = currView.document.file.URI;<br />
var macroPart = ko.toolboxes.user.toolbox.getChildByURL(fileURL);<br />
var isMacro = macroPart != null &amp;&amp; macroPart.type == &#8220;macro&#8221;;</p>
<p>I&#8217;ve asked at irc.mozilla.org#komodo channel and <a href="http://blogs.activestate.com/shanec/">mixedpuppy</a> confirmed me this is the best way.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/62/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/62/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=62&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/07/01/determine-if-the-current-view-is-a-macro-in-komodo/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" 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 [...]]]></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>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Overload same xul element twice</title>
		<link>http://dafizilla.wordpress.com/2008/06/07/overload-same-xul-element-twice/</link>
		<comments>http://dafizilla.wordpress.com/2008/06/07/overload-same-xul-element-twice/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 08:26:19 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[chrome-manifest]]></category>

		<category><![CDATA[overloading]]></category>

		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=59</guid>
		<description><![CDATA[My extension MoreKomodo overloads many elements

command set
toolbar buttons
menu items
find results tab

Due to my laziness I&#8217;ve added all these overloaded elements in main morekomodoOverlay.xul file.
It contains not-strictly-related code all together, for example the find results tab code is separated from other UI elements.
I&#8217;ve found very useful to overload more than once the same element inside chrome.manifest [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My extension <a href="http://dafizilla.sourceforge.net/morekomodo/index.php">MoreKomodo</a> overloads many elements</p>
<ul>
<li>command set</li>
<li>toolbar buttons</li>
<li>menu items</li>
<li>find results tab</li>
</ul>
<p>Due to my laziness I&#8217;ve added all these overloaded elements in main <a href="http://dafizilla.svn.sourceforge.net/viewvc/dafizilla/komodo/morekomodo/src/main/content/morekomodo/morekomodoOverlay.xul?view=markup">morekomodoOverlay.xul</a> file.</p>
<p>It contains not-strictly-related code all together, for example the find results tab code is separated from other UI elements.</p>
<p>I&#8217;ve found very useful to overload more than once the same element inside <a href="http://developer.mozilla.org/en/docs/Chrome_Registration">chrome.manifest</a> to isolate xul code and also javascript code.</p>
<p>It&#8217;s very easy</p>
<pre>overlay  chrome://komodo/content/komodo.xul chrome://morekomodo/content/modokomodoOverlay.xul
overlay  chrome://komodo/content/komodo.xul chrome://morekomodo/content/findResultsOverlay.xul</pre>
<p>That&#8217;s all folks <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=59&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/06/07/overload-same-xul-element-twice/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Komodo wiki content</title>
		<link>http://dafizilla.wordpress.com/2008/06/06/komodo-wiki-content/</link>
		<comments>http://dafizilla.wordpress.com/2008/06/06/komodo-wiki-content/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 14:29:59 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[komodo]]></category>

		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=58</guid>
		<description><![CDATA[I continue to add content to official Komodo wiki page.
I&#8217;m not sure ActiveState is boring to read my contributions but I think a centralized place is better than my blog.
The last added page topic treats the Komodo Notifications, a powerful mechanism to be informed about editor activity.
Only the most important notifications are listed but I [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I continue to add content to official <a href="http://wiki.openkomodo.com/index.php/Main_Page">Komodo wiki page</a>.</p>
<p>I&#8217;m not sure ActiveState is boring to read my contributions but I think a centralized place is better than my blog.</p>
<p>The last added page topic treats the Komodo <a href="http://wiki.openkomodo.com/index.php/Notifications">Notifications</a>, a powerful mechanism to be informed about editor activity.</p>
<p>Only the most important notifications are listed but I hope to complete the list</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/58/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/58/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=58&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/06/06/komodo-wiki-content/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Annoying RadioStateChange usage</title>
		<link>http://dafizilla.wordpress.com/2008/05/30/annoying-radiostatechange-usage/</link>
		<comments>http://dafizilla.wordpress.com/2008/05/30/annoying-radiostatechange-usage/#comments</comments>
		<pubDate>Fri, 30 May 2008 18:09:26 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[RadioStateChange]]></category>

		<category><![CDATA[radiogroup]]></category>

		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=56</guid>
		<description><![CDATA[radiogroup is the worst XUL widget I&#8217;ve ever used, its usage is made boring due to RadioStateChange listener but the real annoying behavior comes on when you want to change radio selection from code.
It is very innatural because changing radiogroup&#8217;s selectionIndex doesn&#8217;t trigger RadioStateChange  and you need to create an event by hand and [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.xulplanet.com/references/elemref/ref_radiogroup.html">radiogroup</a> is the worst XUL widget I&#8217;ve ever used, its usage is made boring due to <a href="http://www.xulplanet.com/references/elemref/ref_EventHandlers.html#attr_RadioStateChange">RadioStateChange</a> listener but the real annoying behavior comes on when you want to change radio selection from code.</p>
<p>It is very innatural because changing radiogroup&#8217;s selectionIndex doesn&#8217;t trigger RadioStateChange  and you need to create an event by hand and trigger it.</p>
<p>var<span style="color:#871f78;"> </span>myEvent = document.createEvent(&#8221;Events&#8221;);<br />
myEvent.initEvent(&#8221;RadioStateChange&#8221;, true, true);<br />
document.getElementById(&#8221;radioGroup&#8221;).dispatchEvent(myEvent);</p>
<p>But this is not sufficient, the RadioStateChange handler is called twice, the first one to &#8220;unselect&#8221; and second one to &#8220;select&#8221;.</p>
<p>Doesn&#8217;t exist a simple manner to determine if handler is called to &#8220;unselect&#8221; or &#8220;select&#8221; so you can&#8217;t use the radiogroup&#8217;s selected propery.</p>
<p>The solution consists to test all radios <a href="http://www.xulplanet.com/references/elemref/ref_radio.html#attr_selected">selected</a> property to find the checked element.</p>
<p>if (document.getElementById(&#8221;folders-radio&#8221;).selected) {<br />
&#8230;<br />
} else if (document.getElementById(&#8221;files-radio&#8221;).selected) {<br />
&#8230;<br />
}</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/56/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/56/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=56&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/05/30/annoying-radiostatechange-usage/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" 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 [...]]]></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>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>GIMP doesn&#8217;t reuse running instance under Windows</title>
		<link>http://dafizilla.wordpress.com/2008/05/05/gimp-doenst-reuse-running-instance-under-windows/</link>
		<comments>http://dafizilla.wordpress.com/2008/05/05/gimp-doenst-reuse-running-instance-under-windows/#comments</comments>
		<pubDate>Mon, 05 May 2008 17:44:22 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[gimp]]></category>

		<category><![CDATA[gimp-remote]]></category>

		<category><![CDATA[gimp-win-remote]]></category>

		<category><![CDATA[viewsourcewith]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/2008/05/05/gimp-doenst-reuse-running-instance-under-windows/</guid>
		<description><![CDATA[A ViewSourceWith&#8217;s user posted an interesting question on forum: how to reuse an already running GIMP instance.
I&#8217;ve never incurred on this problem on my Linux box so I was very surprised.
Booting under Windows I&#8217;ve found this different behavior, very strange because the GIMP documentation explains how to obtain the opposite effect using command line switches, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A <a href="http://dafizilla.sourceforge.net/viewsourcewith/">ViewSourceWith</a>&#8217;s user <a href="https://sourceforge.net/forum/message.php?msg_id=4946036">posted</a> an interesting question on forum: how to reuse an already running GIMP instance.</p>
<p>I&#8217;ve never incurred on this problem on my Linux box so I was very surprised.</p>
<p>Booting under Windows I&#8217;ve found this different behavior, very strange because the GIMP documentation explains how to obtain the opposite effect using <a href="http://docs.gimp.org/en/gimp-fire-up.html#gimp-concepts-running-command-line">command line switches</a>, i.e. running always new instances.</p>
<p>IMHO the reuse technique under Windows is bugged so I found a workaround using the not so famous <a href="http://www.gimp.org/man/gimp-remote.html">gimp-win-remote</a> executable program present on bin directory.</p>
<p>gimp-win-remote checks (correctly) if GIMP is already running and reuse it.</p>
<p>I&#8217;m curious to know if Mac OS/X complains to unix world, if you have a Mac and would satisfy my curiosity I will update the ViewSourceWith <a href="http://dafizilla.sourceforge.net/viewsourcewith/faq.php#gimp_one_instance">FAQ</a> page <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/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=53&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/05/05/gimp-doenst-reuse-running-instance-under-windows/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>Unsuccessful is&#8230;</title>
		<link>http://dafizilla.wordpress.com/2008/05/03/unsuccessful-is/</link>
		<comments>http://dafizilla.wordpress.com/2008/05/03/unsuccessful-is/#comments</comments>
		<pubDate>Sat, 03 May 2008 07:41:59 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[mental-hangover]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=52</guid>
		<description><![CDATA[Today my planet.mozilla feed contains a post from ActiveState&#8217;s technical leader Shane Caraveo.
Shane&#8217;s post title is &#8220;Success is&#8230;&#8221; where incidentally speaks about my VisualDiffer, he tries to define success from different points of view.
I think his team success arrives from good (and very hard) work.
Now I try to define unsuccessful from my personal point of [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today my <a href="http://planet.mozilla.org/">planet.mozilla</a> feed contains a post from <a href="http://www.activestate.com/">ActiveState</a>&#8217;s technical leader <a href="http://blogs.activestate.com/shanec/2008/05/success-is.html">Shane Caraveo</a>.</p>
<p>Shane&#8217;s post title is &#8220;Success is&#8230;&#8221; where incidentally speaks about my <a href="http://dafizilla.sourceforge.net/visualdiffer/index.php">VisualDiffer</a>, he tries to define success from different points of view.</p>
<p>I think his team success arrives from good (and very hard) work.</p>
<p>Now I try to define unsuccessful from my personal point of view.</p>
<p>Unsuccessful is</p>
<p>when you born in wrong place at right time</p>
<p>when you work with stupid people, in stupid companies</p>
<p>when you must leave a software company unable to help you to work better</p>
<p>when smart developers find your work interesting but you can&#8217;t work with them</p>
<p>have a blog with two visits per month</p>
<p>speak (or write) a bad english</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=52&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/05/03/unsuccessful-is/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>VisualDiffer: a new Komodo extension</title>
		<link>http://dafizilla.wordpress.com/2008/05/03/visualdiffer-a-new-komodo-extension/</link>
		<comments>http://dafizilla.wordpress.com/2008/05/03/visualdiffer-a-new-komodo-extension/#comments</comments>
		<pubDate>Sat, 03 May 2008 07:17:11 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[extension]]></category>

		<category><![CDATA[komodo]]></category>

		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=51</guid>
		<description><![CDATA[When I migrated to Ubuntu I loose some important developer tools like UltraEdit and Beyond Compare two closed-source commercial applications representing the state-of-art like editor and file comparator.
I&#8217;ve created MoreKomodo (the original name was UltraKomodo  ) to add to KomodoEdit the UltraEdit features I need.
Folders and files comparison tools under Gnome are poor so [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When I migrated to Ubuntu I loose some important developer tools like <a href="http://www.ultraedit.com/">UltraEdit</a> and <a href="http://www.scootersoftware.com/">Beyond Compare</a> two closed-source commercial applications representing the state-of-art like editor and file comparator.</p>
<p>I&#8217;ve created <a href="http://dafizilla.sourceforge.net/morekomodo/index.php">MoreKomodo</a> (the original name was UltraKomodo <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) to add to <a href="http://www.activestate.com/Products/komodo_ide/komodo_edit.mhtml">KomodoEdit</a> the UltraEdit features I need.</p>
<p>Folders and files comparison tools under Gnome are poor so I&#8217;ve decided to create my own differ application based on KomodoEdit for at least three reasons</p>
<p>KomodoEdit is open source</p>
<p>KomodoEdit is XUL based so I can develop re-using my know-how</p>
<p>KomodoEdit is multiplatform (thanks to Mozilla Gecko Engine)</p>
<p>Finally I&#8217;ve finished the first stable version of <a href="http://dafizilla.sourceforge.net/visualdiffer/index.php">VisualDiffer</a>, it misses many features but I hope to add them.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/51/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/51/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=51&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/05/03/visualdiffer-a-new-komodo-extension/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
		<item>
		<title>How to get element style values from XUL (or HTML)</title>
		<link>http://dafizilla.wordpress.com/2008/04/07/how-to-know-element-style-values-from-xul-and-html/</link>
		<comments>http://dafizilla.wordpress.com/2008/04/07/how-to-know-element-style-values-from-xul-and-html/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 18:15:34 +0000</pubDate>
		<dc:creator>dafi</dc:creator>
		
		<category><![CDATA[css]]></category>

		<category><![CDATA[table2clipboard]]></category>

		<category><![CDATA[xul]]></category>

		<guid isPermaLink="false">http://dafizilla.wordpress.com/?p=50</guid>
		<description><![CDATA[I&#8217;m working to my Extend Firefox 2 Runner Up winner Table2Clipboard.
Many users tell me to add a simple feature, exclude cells having style display: none.
The solution is so straightforward that I could not believe after initial implementation.
You can style an element using CSS selectors
.invisible {
display: none;
}
&#60;span id=&#8220;invisibleSpan&#8221; class=&#8220;invisible&#8221;&#62;I&#8217;m invisible man&#60;/span&#62;
or using the attribute style attribute
&#60;span [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m working to my Extend Firefox 2 <a href="http://blog.mozilla.com/extendfirefox/2008/03/12/announcing-the-extend-firefox-2-winners/">Runner Up</a> winner <a href="http://dafizilla.sourceforge.net/table2clip/index.php">Table2Clipboard</a>.</p>
<p>Many users tell me to add a simple feature, exclude cells having style display: none.</p>
<p>The solution is so straightforward that I could not believe after initial implementation.</p>
<p>You can style an element using CSS selectors</p>
<p>.<span style="color:#008b8b;">invisible</span> <span style="color:#871f78;">{</span><br />
display: <span style="color:#871f78;">none</span>;<br />
<span style="color:#871f78;">}</span></p>
<p><span style="color:#0000ff;">&lt;span</span> <span style="color:#871f78;">id</span><span style="color:#871f78;">=</span><span style="color:#23238e;">&#8220;invisibleSpan&#8221;</span> <span style="color:#871f78;">class=</span><span style="color:#23238e;">&#8220;invisible&#8221;</span><span style="color:#0000ff;">&gt;</span>I&#8217;m invisible man<span style="color:#0000ff;">&lt;/span&gt;</span></p>
<p>or using the attribute style attribute</p>
<p><span style="color:#0000ff;">&lt;span</span> <span style="color:#871f78;">id</span><span style="color:#871f78;">=</span><span style="color:#23238e;">&#8220;invisibleSpan&#8221;</span> <span style="color:#871f78;">style=</span><span style="color:#23238e;">&#8220;display : none&#8221;</span><span style="color:#0000ff;">&gt;</span>I&#8217;m invisible man<span style="color:#0000ff;">&lt;/span&gt;</span></p>
<p>These two ways can both simply handled using <a href="http://developer.mozilla.org/en/docs/DOM:window.getComputedStyle">getComputedStyle</a></p>
<p><span style="color:#871f78;">var</span> spanElement <span style="color:#871f78;">=</span> document.getElementById<span style="color:#871f78;">(</span><span style="color:#23238e;">&#8220;invisibleSpan&#8221;</span><span style="color:#871f78;">)</span>;<br />
<span style="color:#871f78;">var</span> style <span style="color:#871f78;">=</span> spanElement.ownerDocument.defaultView.getComputedStyle<span style="color:#871f78;">(</span>spanElement, <span style="color:#871f78;">null</span><span style="color:#871f78;">)</span>;<br />
<span style="color:#871f78;">var</span> displayValue <span style="color:#871f78;">=</span> style.getPropertyValue<span style="color:#871f78;">(</span><span style="color:#23238e;">&#8220;display&#8221;</span><span style="color:#871f78;">)</span>;</p>
<p>That&#8217;s all folks!!</p>
<p>Obviously you can use any CSS attribute not only <span style="color:#23238e;">display</span>.</p>
<p>Pay attention to ownerDocument.defaultView, you should use window.getComputedStyle() but under XUL this doesn&#8217;t return what you expect.</p>
<p>getComputedStyle can be used in normal unprivileged HTML code, too.</p>
<p>getComputedStyle is a W3C standard and is present on Internet Explorer, Opera and Safari, too.</p>
<p>Little things make developer life easier.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/dafizilla.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/dafizilla.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dafizilla.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dafizilla.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dafizilla.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dafizilla.wordpress.com&blog=887576&post=50&subd=dafizilla&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://dafizilla.wordpress.com/2008/04/07/how-to-know-element-style-values-from-xul-and-html/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/dafizilla-128.jpg" medium="image">
			<media:title type="html">dafi</media:title>
		</media:content>
	</item>
	</channel>
</rss>