<?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>Andrew Grimo&#039;s Blog</title>
	<atom:link href="http://andrewgrimo.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewgrimo.wordpress.com</link>
	<description>Progamming the object oriented world - into a better place</description>
	<lastBuildDate>Sun, 12 May 2013 00:42:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='andrewgrimo.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andrew Grimo&#039;s Blog</title>
		<link>http://andrewgrimo.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://andrewgrimo.wordpress.com/osd.xml" title="Andrew Grimo&#039;s Blog" />
	<atom:link rel='hub' href='http://andrewgrimo.wordpress.com/?pushpress=hub'/>
		<item>
		<title>0.3 Release&#8230; Multi-touch with an Extension on/off switch</title>
		<link>http://andrewgrimo.wordpress.com/2009/12/16/0-3-release-multi-touch-with-an-extension-onoff-switch/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/12/16/0-3-release-multi-touch-with-an-extension-onoff-switch/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 03:33:24 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[mozilla-bug-dev]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=143</guid>
		<description><![CDATA[Some great achievements here&#8230;  and some utter frustration.  After spending an hour due to missing some curly braces on a call to a property that plays host to an anonymous function, I finally got a very cool extension in place to test the waters of intercepting and tinkering with the default behaviour of the multi-touch [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=143&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Some great achievements here&#8230;  and some utter frustration.  After spending an hour due to missing some curly braces on a call to a property that plays host to an anonymous function, I finally got a very cool extension in place to test the waters of intercepting and tinkering with the default behaviour of the multi-touch events that I have in place.  To get these noted first&#8230; here are some pertinent links:</p>
<ul>
<li><a title="Bugzilla - Multi-touch for Mac" href="https://bugzilla.mozilla.org/show_bug.cgi?id=465257#c26" target="_blank">The Bug on Bugzilla </a></li>
<li><a href="http://tinyurl.com/ykyphvd" target="_blank">The link to my dmg image installer of Thunderbird for Mac</a></li>
<li><a href="http://tinyurl.com/yb374ny" target="_blank">The link to my extension that I developed &#8211; gives an on/off switch link function</a></li>
<li><a href="http://matrix.senecac.on.ca/~agrimo/osd/TB-Multi-touch.0.3.patch" target="_blank">And a direct link to the patch</a> (which is already built into the Thunderbird for Mac installer)</li>
</ul>
<h3>The almost complete Release&#8230;</h3>
<p>I despise this.  But I must accept.  We discussed in class some of the concepts around open source development and one of the ideas was the relaxed pace to get things done&#8230; the lack of stress and pressures that come from a normal job.  Who wants to be normal anyhow&#8230;. well&#8230;. being in school with deadlines still makes it feel pretty normal, but here it goes.</p>
<h3>The Patch</h3>
<p>I managed to use some of the latest coding found in the firefox realm to fire off the events for the multi-touch actions.  But the new code has a strange behaviour that causes the x/y coordinates of the event to get lost for my up/down swipe events.  So I set up the action to use the older method of firing the event.  Actually, all of the functionality could work fine under the older system, but I wanted to have the newer code implementations in place for the sake of future proofing the work and taking it in a direction they are heading in anyhow.  So for that it feels a little incomplete, but it still is only a 0.3 release and not a full fledge polished submission.</p>
<h3>The Extension</h3>
<p>The extension was a bugger.  I&#8217;m not even sure I went in the correct direction with it, but I&#8217;ve got it doing something cool.  First here&#8217;s the problem with the extension.  It won&#8217;t work when you install it the normal way.  You have to expand the files and then use a reference file that you place in your extensions directory of your profile&#8230; and then it will work.   So I&#8217;m looking into that, but for the sake of posting it even though  its not perfect&#8230; here it is!</p>
<p>What&#8217;s cool about it is this.  In the menu that the &#8220;add-ons&#8221; are on, this extension puts two items on the bottom of the menu list.  One will disable or turn off the swipe and pinch behaviours and the other will turn them back on!!!  I thought it was fun.  It does so by storing the preferences when Thunderbird loads, and then erases them when you turn them off, and places them back in place when you turn the mutli-touch actions back on.  Just to protect the settings, they are saved back when Thunderbird quits.</p>
<h3>My digression</h3>
<p>Well, I&#8217;m not back next semester, but I will approach this bug as a true open source project&#8230; and not a school project.  Which means I&#8217;ll relax with it and work on it when I can.  I do like what I&#8217;m working on and at the moment have a wish to do OSD700 in the summer if possible, so keeping my feet wet will be good.  I will continue to post blogs, but not likely as frequently as we&#8217;ve been doing or trying to do.  Thanks for wonderful semester and I&#8217;ll see you all around.</p>
<br />Posted in mozilla-bug-dev, open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=143&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/12/16/0-3-release-multi-touch-with-an-extension-onoff-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi-touch support&#8230; next step done</title>
		<link>http://andrewgrimo.wordpress.com/2009/12/15/multi-touch-support-next-step-done/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/12/15/multi-touch-support-next-step-done/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 02:41:05 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[mozilla-bug-dev]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=141</guid>
		<description><![CDATA[In terms of my open source course, my latest patch to the Mozilla Thunderbird community is a little behind.  In terms of the Thunderbird community, I&#8217;ve already received an email (less than 5 minutes from posting the patch) that they&#8217;re excited about what I&#8217;m doing.  Such gratitude is certainly humbling.  Its nice to spend a [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=141&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In terms of my open source course, my latest patch to the Mozilla Thunderbird community is a little behind.  In terms of the Thunderbird community, I&#8217;ve already received an email (less than 5 minutes from posting the patch) that they&#8217;re excited about what I&#8217;m doing.  Such gratitude is certainly humbling.  Its nice to spend a couple straight days 8-10 hours straight each time and pull out a patch that someone is just really happy that somebody is doing the work.  Kind of a nice warm fuzzy feeling&#8230;</p>
<p><a title="Patch/Comments for my Multi-touch behaviours" href="https://bugzilla.mozilla.org/show_bug.cgi?id=465257#c25" target="_blank">The patch is here.</a></p>
<p>This is not my final release blog for my 0.3.  It is a first major stage of it.  This blog is simply to commemorate the occasion.  Will post again tomorrow.  Until then, I&#8217;m working with buddhatron: on the extension&#8217;ing of this patch.</p>
<br />Posted in mozilla-bug-dev, open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=141&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/12/15/multi-touch-support-next-step-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>
	</item>
		<item>
		<title>Mozilla Thunderbird Project follow up</title>
		<link>http://andrewgrimo.wordpress.com/2009/12/07/mozilla-thunderbird-project-follow-up/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/12/07/mozilla-thunderbird-project-follow-up/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 03:56:46 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[mozilla-bug-dev]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=136</guid>
		<description><![CDATA[Onwards to 0.3 Ok, so the semester is nearing an end and the multitude of intense courses this semester has been hitting me to the ground&#8230;. but I shake off the dirt from my clothes, get my composure&#8230; and keep pushing forward.  So where are things at and where are they going. Blogs for my [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=136&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h3>Onwards to 0.3</h3>
<p>Ok, so the semester is nearing an end and the multitude of intense courses this semester has been hitting me to the ground&#8230;. but I shake off the dirt from my clothes, get my composure&#8230; and keep pushing forward.  So where are things at and where are they going.</p>
<blockquote><p>Blogs for my project<br />
<a title="0.2 Release" href="http://andrewgrimo.wordpress.com/2009/11/20/thunderbird-multi-touch-0-2-release/" target="_blank">0.2 Release</a><br />
<a title="Detecting a Pane in Thunderbird" href="http://andrewgrimo.wordpress.com/2009/11/19/detecting-a-pane-in-thunderbird/" target="_blank">Detecting Window Panes<br />
</a><a title="0.1 Release" href="http://andrewgrimo.wordpress.com/2009/10/22/thunderbird-multi-touch-0-1-release-on-the-path-of-a-bug/" target="_blank">0.1 Release</a><br />
<a title="Listing of them all..." href="http://andrewgrimo.wordpress.com/category/open-source/mozilla-bug-dev/" target="_blank">&#8230; </a></p></blockquote>
<h3>I have a problem</h3>
<p>The first realization&#8230; I&#8217;m a perfectionist&#8230; well, its possible and likely&#8230; but more importantly, I&#8217;ve found myself and received feedback from people that I program by playing it safe by doing a lot of planning.  Whereas those that gave me the feedback attributed their own programming style to be more like a bull in a china shop.  How does this relate?</p>
<p>I tend to plan my approach a lot and I like to know what I&#8217;m doing.  The plan isn&#8217;t such a bad idea and I&#8217;ll note it next.  The whole &#8220;knowing what I&#8217;m doing&#8221; thing, just isn&#8217;t going to happen while I&#8217;m in school&#8230;. hell, that won&#8217;t even happen while I&#8217;m on the job.  It&#8217;ll happen after a project is done&#8230; and then I&#8217;ll move onto the next project and the learning starts all over.</p>
<p>What improves, and what I&#8217;m improving at, is my general understanding of programming and development work.  So I suppose the problem is not so much not knowing what I&#8217;m doing&#8230; but ensuring that I&#8217;m trying things without being so  concerned whether its going to work perfectly the first time.  Now that I&#8217;m on the crunch of the semester end&#8230; this type of approach IS A MUST!</p>
<h3>My Plan</h3>
<ul>
<li>Fix the scrolling of the message pane so that it does a full scroll top/bottom and not paging.</li>
<li>create an extension to override the default behaviour (of course this will require sweetening up the current code that&#8217;s in place)
<ul>
<li>getting preferences configured so that the flow of the code is streamlined enough it can be capture for multiple events from a single point.</li>
<li>get familiar with extensions in Thunderbird, particularly for capturing user multi-touch events. (<a title="Blogging on Extension Development in TB" href="http://buddhatron.wordpress.com/2009/12/07/crunch-time/" target="_blank">Nadim is aiding with this via blogging right now</a>)</li>
<li>build the extension and cleaned up code and submit a patch and post on progress.</li>
</ul>
</li>
</ul>
<p>There is much learning to be done here.  So for now, the trick will be to get the learning accomplished and get coding as I figure things out.  Even if it means a change in the code could break the whole thing.  Just dig in!</p>
<br />Posted in mozilla-bug-dev, open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=136&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/12/07/mozilla-thunderbird-project-follow-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>
	</item>
		<item>
		<title>Mozilla XPCOM Learning Lab</title>
		<link>http://andrewgrimo.wordpress.com/2009/12/07/mozilla-xpcom-learning-lab/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/12/07/mozilla-xpcom-learning-lab/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 03:11:15 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=129</guid>
		<description><![CDATA[Here is another fine presentation for learning XPCOM from Mozilla in my Open Source program at Seneca College.  This lab guides you through the process of creating an extension as part of the mozilla build.  You can also build extensions as a separate XPI installer which we did in a previous lab and I posted [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=129&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here is another fine presentation for learning <a title="XPCOM Education/Learning for Mozilla" href="https://wiki.mozilla.org/Education/Learning/XpcomComponents" target="_blank">XPCOM from Mozilla</a> in my <a title="Open Source @ Seneca College" href="http://zenit.senecac.on.ca/wiki/index.php/Main_Page" target="_blank">Open Source program at Seneca College</a>.  This lab guides you through the process of creating an extension as part of the mozilla build.  You can also build extensions as a separate XPI installer which we did in a <a title="Modifying the Browser with an Extension" href="https://wiki.mozilla.org/Education/Learning/ModifyBrowserExtension" target="_blank">previous lab </a>and I posted on by inflicting a tabbing behaviour that <a title="Reversing Tabs Extension" href="http://andrewgrimo.wordpress.com/2009/11/15/reversing-firefox-tabs-as-an-extension/" target="_blank">opened new tabs to the left</a> of the current tab instead of the right hand side.</p>
<p><a href="http://andrewgrimo.files.wordpress.com/2009/12/js-output.jpg"><img class="aligncenter size-full wp-image-130" title="Javascript Output from XPCOM Extension" src="http://andrewgrimo.files.wordpress.com/2009/12/js-output.jpg?w=500&#038;h=368" alt="" width="500" height="368" /></a></p>
<h3>The Extension in Action</h3>
<p>Above, is a picture of the extension that was added to the Firefox build.  Actually, the XPCom class that we built only has 1 attribute which a getter/setter are made and a method called add( ) which takes two number parameters and adds them together.  Also, when those methods/properties are called upon, they produce output into the debugging log which is what you see in the command line output at the bottom of the picture.  Seems simple yes!&#8230; Why did it take me a week to figure it out then.</p>
<h3>Lost in File path Jungle</h3>
<p>One of my reasons for taking so long with this is due to the fact that when the lab was originally written, the place where the header files for the automatically created XPCom object had moved since then.  They are now stored in a different place.  This was discovered when we asked the instructor in class and he pointed this out.  It didn&#8217;t mean that we still weren&#8217;t stumped on trying to navigate our way around.</p>
<p><a href="http://andrewgrimo.files.wordpress.com/2009/12/filepath.jpg"><img class="aligncenter size-full wp-image-132" title="New File paths..." src="http://andrewgrimo.files.wordpress.com/2009/12/filepath.jpg?w=500&#038;h=244" alt="" width="500" height="244" /></a></p>
<h3>Contributions to the Learning Wiki</h3>
<p>In order to rectify where the heck the files were being created automatically in the lab, I had to straighten out the wiki page that hosted this lab assignment.  My teacher invited it to be updated when we found the error, so just recently I went in and did that.</p>
<p>Essentially, in the lab, it was stating that the header files would be placed in a directory that was no longer being created within &#8220;$(moz_obj)/dist/include/{noLongerUsedDirectory}&#8221;.  So I went through the article and made changes as they appear in the image above.</p>
<p>All of the files that were dynamically created were in the mozilla source code directory and then inside the object directory where all of your compiled object files are stored.  The difference now is the in the &#8220;dist/include/&#8221; directory it now has an alias to the header file.  The actual header file is placed in &#8220;extensions/{extensionName}/public/_xpidlgen/&#8221;.  So I went through the lab and made changes to the file paths to reflect those changes.  Hopefully this will help clear things up for others in subsequent courses.</p>
<h3>Oh ya, Install the Extension!</h3>
<p><a href="http://andrewgrimo.files.wordpress.com/2009/12/extensions-window.jpg"><img class="aligncenter size-full wp-image-131" title="Extensions loaded in Firefox" src="http://andrewgrimo.files.wordpress.com/2009/12/extensions-window.jpg?w=500&#038;h=218" alt="" width="500" height="218" /></a></p>
<p>Ok, so I needed help from my instructor and got some ideas on why my code wasn&#8217;t working.  First thing that he had me check was to see if the extension was installed.  At that moment I recognized a void in my thinking&#8230;. I realized I had not even thought that this extension would need to be installed at all.  I figured&#8230; its built in the source code and compiled with Firefox.  I thought it&#8217;d be installed automatically.  Not the case!</p>
<p>So for the sake of sharing this simple little tidbit with others, maybe it&#8217;ll help make more sense of extensions that are built in the browser.  Also note&#8230; the Extension Developer extension will give you that javascript shell that the lab will need too.</p>
<br />Posted in open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=129&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/12/07/mozilla-xpcom-learning-lab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/12/js-output.jpg" medium="image">
			<media:title type="html">Javascript Output from XPCOM Extension</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/12/filepath.jpg" medium="image">
			<media:title type="html">New File paths...</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/12/extensions-window.jpg" medium="image">
			<media:title type="html">Extensions loaded in Firefox</media:title>
		</media:content>
	</item>
		<item>
		<title>Thunderbird Multi-touch 0.2 Release</title>
		<link>http://andrewgrimo.wordpress.com/2009/11/20/thunderbird-multi-touch-0-2-release/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/11/20/thunderbird-multi-touch-0-2-release/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 14:12:50 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[mozilla-bug-dev]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=124</guid>
		<description><![CDATA[Well after much fussing about with porting a bug fix that was intended for Firefox in dealing with multi-touch scrolling issues into  Thunderbird, I resolved the process and now have 3 finger swipe scrolling.  In the end, the final fix was removing a shortcut of &#8220;Ci&#8221; that was used in Firefox code to represent &#8220;Components.interfaces&#8221;. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=124&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Well after much fussing about with porting a bug fix that was intended for Firefox in dealing with <a title="Thunderbird Multi-touch Integration" href="https://bugzilla.mozilla.org/show_bug.cgi?id=465257" target="_blank">multi-touch scrolling issues into  Thunderbird</a>, I resolved the process and now have 3 finger swipe scrolling.  In the end, the final fix was removing a shortcut of &#8220;Ci&#8221; that was used in Firefox code to represent &#8220;Components.interfaces&#8221;.</p>
<p>My <a title="Downloadable patch 0.2 release" href="http://matrix.senecac.on.ca/~agrimo/osd/TB-Multi-touch_0.2.patch" target="_blank">patch is posted here</a>, and a sample package of<a title="Downloadable Mac (intel) Thunderbird 3.1a1pre dmg file" href="http://matrix.senecac.on.ca/~agrimo/osd/thunderbird-3.1a1pre.en-US.mac.dmg" target="_blank"> Thunderbird for Mac with my patch in place is here</a>.</p>
<p>After an excellent introduction to components and their idl interfaces in class today, this fix was almost simple.  In turn, this got the function that a firefox developer came up with which was to <a title="Firefox - 3 Finger swipe up/down as mouse scroll event" href="https://bugzilla.mozilla.org/show_bug.cgi?id=461500" target="_blank">scroll a window by synthesizing a mouse scroll event</a>.</p>
<p>Previously I had found a way to <a title="JS code to isolate out the 3 window panes" href="http://pastebin.mozilla.org/684959" target="_blank">isolate out the 3 different panes in the Thunderbird</a> main window&#8230;. being:  Folder pane, Message thread pane, and the Message pane.  In the end this wasn&#8217;t necessary, but it may come in handy for other custom actions.</p>
<p>Currently, preferences for these events aren&#8217;t propagating through Thunderbird properly and I have to learn the preferences system in Thunderbird to get it in use.  I imagine this will help to slim out the code and ensure better integration for extension/add-on capabilities for customizing the multi-touch behaviors.</p>
<p>There also seems to be a change in the behaviour of the synthensized mouse event that I am calling.  Since updating my revisions, the forced scroll behaviour now only seems to do a pageUp/pageDown event instead of a full scroll Top/Bottom.  I will need to investigate and maybe explicitly synthesize pageTop/pageBottom key strokes.</p>
<br />Posted in mozilla-bug-dev, open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=124&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/11/20/thunderbird-multi-touch-0-2-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>
	</item>
		<item>
		<title>Detecting a Pane in Thunderbird!</title>
		<link>http://andrewgrimo.wordpress.com/2009/11/19/detecting-a-pane-in-thunderbird/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/11/19/detecting-a-pane-in-thunderbird/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 07:43:14 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[mozilla-bug-dev]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=120</guid>
		<description><![CDATA[From failure, to opportunity, to failure, to a success that will hopefully lead to another success&#8230; but inevitably, the cycle will continue! What is all this referring to?   My work on implementing multi-touch controls on Thunderbird. It&#8217;s a bug in the Mozilla community and its a major project for my Open Source Development course. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=120&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>From failure, to opportunity, to failure, to a success that will hopefully lead to another success&#8230; but inevitably, the cycle will continue!</p>
<p>What is all this referring to?   My work on implementing <a title="Multi-touch on Thunderbird for Mac" href="http://andrewgrimo.wordpress.com/2009/09/28/thunderbird-multi-touch-for-mac/" target="_blank">multi-touch controls on Thunderbird.</a> It&#8217;s a <a title="A Pain Indeed! But if we never suffered, would we ever live... does programming lead to enlightenment.... or more suffering!   :-)" href="https://bugzilla.mozilla.org/show_bug.cgi?id=465257" target="_blank">bug in the Mozilla community</a> and its a major project for <a title="Open Source Education @ Seneca College" href="http://zenit.senecac.on.ca/wiki/index.php/Main_Page" target="_blank">my Open Source Development course</a>.  You can also follow this on <a title="Multi-touch/Thunderbird Wiki Page" href="http://zenit.senecac.on.ca/wiki/index.php/Thunderbird_Multi-touch_Gesture_Support_for_OS_X" target="_blank">my project wiki page</a>.</p>
<h3>The Starting Point of this Phase</h3>
<p><a title="My 0.1 Release" href="http://andrewgrimo.wordpress.com/2009/10/22/thunderbird-multi-touch-0-1-release-on-the-path-of-a-bug/" target="_blank">My 0.1 release</a> acts as the starting point that I am referencing here.  Back then, I managed to get a 3 finger swipe in all directions to make an action over the 3 pane message window in Thunderbird.  The 3 page message window consists of a pane on the left for showing the folders in your email account, a pane at the top that is the thread of messages for the selected folder, and a pain below that that shows the selected message&#8230; no, that&#8217;s not a spelling error!</p>
<p>So although there was an action for all 4 swipe direction, it was the same action that impacted the same pane, regardless of which pane your cursor was hovering over.  The community concluded, and I agreed, that a distinct action should occur that impacts the pane that your are over top of.  So&#8230; this is where it begins.</p>
<h3>A Possible Solution from a Firefox Bug</h3>
<p>Along came a spider who sat down beside her and said&#8230;&#8221;check out this bug, its scrolling the page without requiring a focus event!&#8221;.  Ok ok&#8230;. it&#8217;s a little late at night and I&#8217;m writing blogs again&#8230; but seriously, out of what seemed like now where, I received an email from someone adding a &#8220;polished&#8221; whiteboard comment to<a title="3 finger swipe up/down scroll issue" href="https://bugzilla.mozilla.org/show_bug.cgi?id=461500" target="_blank"> a bug that I happen to have been following</a>.</p>
<p>I was considering that maybe for my solution in Thunderbird, I need to do something that wouldn&#8217;t hold a focus to the content window itself (which contains all of the panes) and instead NOT hold a focus to the window in lieu of retaining it for one of the panes alone.  When I saw the bug linked above, they were trying to remove focus on elements on a webpage and thus allow the parent element to scroll so that the scroll event doesn&#8217;t get trapped by the child.</p>
<h4>Try this  (&#8230; if you can)</h4>
<p>You can try this if you have a mac with a multi-touch trackpad&#8230; Open up Firefox (I know, you are already using it, so this is for those who don&#8217;t KNOW yet&#8230;. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  &#8230;. and:</p>
<ol>
<li>Go to the <a title="Google Homepage for Firefox" href="http://www.google.ca/firefox?client=firefox-a&amp;rls=org.mozilla:en-US:official" target="_blank">Google Homepage (www.google.ca)</a>.</li>
<li>Narrow the height of the window so that your vertical scroll bar appears.</li>
<li>Place your cursor inside the textbox where you&#8217;d type in your search for Google.</li>
<li>Now try and scroll by sliding up or down with 3 fingers on your trackpad.</li>
<li>Witness the fact that it <strong>does not scroll the page</strong> at all!</li>
<li>Now remove your cursor from the textbox by touch the Firefox image.</li>
<li>Now scroll again as you did above&#8230; <strong>it scrolls!</strong></li>
<li>The solution that they created fixes this so that it scrolls for both situations.<br />
(unfortunately it seems that other code updates have compromised their proposed patch, so I&#8217;ve left them a <a title="comment on bug" href="https://bugzilla.mozilla.org/show_bug.cgi?id=461500#c45" target="_blank">warning comment</a> regarding this).</li>
</ol>
<p>Their solution calls an interface which has access to a function that synthesizes the affect of a mouse scroll event.  So I attempt to drop the code in place&#8230; by skipping some steps and I try to call the mouse scroll function directly&#8230; failure!</p>
<p><a href="http://andrewgrimo.files.wordpress.com/2009/11/browserscroll.png"><img class="aligncenter size-full wp-image-121" title="BrowserScroll function" src="http://andrewgrimo.files.wordpress.com/2009/11/browserscroll.png?w=500" alt=""   /></a></p>
<p>There is something too different from the way that there code is received in Thunderbird on this 3 pain window!</p>
<h3>Seeing the Forest from the Trees</h3>
<p>Ok, so I had some of their code in place, and simply be eliminating the window._content.focus from the page didn&#8217;t solve the problem as I had hoped.  Despair started to seep in, especially as the latest firefox updates had changed the code base to my gesture support comparison and now I had to monkey around reverting my code base back to its original state with Time Machine on my mac (the backup software on my laptop).  Issue after issue arose just trying to compile and get Firefox up and running so that I could learn from it a little bit better.  I did manage to get it back and ran through a walkthrough (by leaving a trail dump(&#8220;output messages&#8221;);  as the program ran so that I could track all of the events that occurred for a single swipe!</p>
<p>but thought about this&#8230; maybe the interface that is being called for the scroll event has a problem with the window pane that it&#8217;s focused on.  Of course, but how to isolate out which pane I was working on&#8230;..   of course!</p>
<h3>Javascript: The Good Parts to the Rescue!</h3>
<p>The first thing I was to do&#8230; (in hopes that this is the correct trail that I&#8217;m following while lost in the forest) was to get some code in place that would track what the current code is actually looking at.  For those real keeners&#8230; here&#8217;s a <a title="Browser Scroll - debugger terminal output" href="http://matrix.senecac.on.ca/~agrimo/osd/BrowserScroll-Feedback.pdf" target="_blank">cleaned up PDF of the output</a> so you can follow along.</p>
<p>Essentially, when the scroll event happened over the message pane, it was showing up as a XPCNativeWrapper object as the event&#8217;s target object.  For the other two panes, they were coming back as XULElement object items.  hummm&#8230;. I need more information so that I can start defining what is happening.</p>
<p>Do to some ungrateful slams against javascript&#8230; my teacher conceded to point out the fact that we have no idea how javascipt works and that&#8217;s why we think its crap!  So he gave a very quick introduction to its advanced concepts and also pointed out two Javascript books that were the only ones worth getting.  One of which was &#8220;Javascript: The Good Parts&#8221;.  Yes, the name implies correctly that there are a number of bad parts&#8230; the beauty is this book is super concise and distinguishes the good from the bad and points out in a simple approach the more advanced (and good) parts of Javascript.  SO with this book now in hand&#8230;. I march on.</p>
<p><strong>Search through the Properties</strong></p>
<p>I remember in a section that I read on properties and objects that you could enumerate through the properties and he even pointed out how to avoid the properties that were functions.  This was my next step:</p>
<div id="_mcePaste">
<pre style="padding-left:30px;">let doc = aEvent.target;      
var docNameX;   
for ( docNameX in doc){     
  if(typeof doc[docNameX] !== 'function') {
    dump("\n" + docNameX + " : " + doc[docNameX] + "")
  }   
}
dump("\n end of property list  \n\n");</pre>
</div>
<p>This produced some wonderful output.  The XPCNativeWrapper object was rather unreliable in providing output, but the XULElements had all sorts of interesting properties related to them.  The trick now was to find some conditions that would isolate them out.</p>
<p><strong>Isolating the Pains&#8230;  I mean Panes!</strong></p>
<p>So I had tested some various conditions and found that even if I tested a property with the javascript object method hasOwnProperty (I also could have been using it in the wrong context) would cause the XPCNativeWrapper to crash out when it checked for a true/false against this object.  I was expecting a false scenario, but instead as mentioned, the function beyond that test just fails.  So I discovered this alternative, which successfully isolated out the pane that I was swiping over top of.</p>
<pre style="padding-left:30px;"><span style="color:#008000;">if</span>(<strong>doc['namespaceURI'] !== null</strong>){ 
  // it is at least a XULElement (folder pane or message thread page 
  <span style="color:#008000;">if</span>(<strong>doc['tooltip'] == "folderpopup"</strong>){ 
    dump("\n  <span style="color:#993300;">You are over the Folder Pane!</span>"); 
  } <span style="color:#008000;">else</span> { 
    dump("\n  <span style="color:#993300;">You are over the Message Thread Pane!</span>"); 
  } 
} <span style="color:#008000;">else</span> { // its a XPCNativeWrapper (message viewer) 
  dump("\n  <span style="color:#993300;">You are over the Message Pane!</span>"); 
} 
dump("\n  Did you find your correct Pain!  \n");</pre>
<p>Success!&#8230;</p>
<p><strong>Next Steps&#8230;</strong>.  How to trigger an event for these conditions based on the correct pane now being capable of isolation.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />Posted in mozilla-bug-dev, open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=120&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/11/19/detecting-a-pane-in-thunderbird/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/11/browserscroll.png" medium="image">
			<media:title type="html">BrowserScroll function</media:title>
		</media:content>
	</item>
		<item>
		<title>Back to the Javascript, Part 2</title>
		<link>http://andrewgrimo.wordpress.com/2009/11/16/back-to-the-javascript-part-2/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/11/16/back-to-the-javascript-part-2/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 05:51:02 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=118</guid>
		<description><![CDATA[Ok, so this is a followup blog to a previous one where I made some fun at the Javascript language.  Criticizing it as a toy and possibly in my own mind, being critical for its cryptic looking nature.  And thus, I was attacked by my instructor for my comments, I was thrown to the ground, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=118&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Ok, so this is a followup blog to a previous one where I made some fun at the Javascript language.  Criticizing it as a toy and possibly in my own mind, being critical for its cryptic looking nature.  And thus, I was attacked by my instructor for my comments, I was thrown to the ground, my face mashed in the mud&#8230; I was humbled actually.  Ok, so he didn&#8217;t attack me&#8230; we had a couple pleasant jabs at each other.  But what came from it was some inspiration for him to introduce our Open Source Development class to some of the better features of Javascript and an exploratory environment where we got to discuss some of its very good and complex features.</p>
<blockquote><p>I think the &#8220;<a title="Back to the Future II - movie" href="http://www.imdb.com/title/tt0096874/" target="_blank">Back to the Future II</a>&#8221; spin on things is appropriate here.  We have a language that could be much better&#8230; it&#8217;s almost like the discovery of what it can do, based on the good qualities of its precursor languages (scheme,lisp) leaves it to have some very special abilities.  But where is our <a title="Micheal J. Fox - Back to the future series... among others" href="http://www.imdb.com/name/nm0000150/" target="_blank">Marty McFly</a> to save us by going back to the future to protect a language that could have been great.  Instead Javascript lands upon us as if <a title="Thomas F. Wilson - Back to the Future series" href="http://www.imdb.com/name/nm0001855/" target="_blank">Biff Tannen</a> had butchered it by poisoning the past.</p></blockquote>
<h3><a title="Douglas Crockford" href="http://www.crockford.com/" target="_blank">Douglas Crockford</a></h3>
<p>This name should be known by anyone who has the need to be a Javascript developer.  He is the mind behind <a title="JSON" href="http://www.JSON.org/" target="_blank">JSON</a>, the data-interchange format to replace XML, he also developed, in some of his off time, <a href="http://www.JSLint.com/" target="_blank">JSLint</a> which is a javascript code quality tool (highly recommended by Crockford&#8230; even for himself) and author of a very very cool book, <a title="All sorts of JS links on Crockfords page here!" href="http://javascript.crockford.com/" target="_blank">Javascript: The Good Parts</a>.  I did purchase this book, and not only is it nice due to the fact that its barely 150 pages, but its cram packed full of good stuff, and the fluff is pretty much removed so it gets right to the guts of it.  Our lab was to review this video of <a title="Douglas talks about his book, and Javascripts future" href="http://www.youtube.com/watch?v=hQVTIJBZook" target="_blank">Douglas doing a talk on &#8220;The Good Parts&#8221;</a>, but I guess I purchased the book first&#8230; then listened to the review.</p>
<h3>Brief Conclusion to a Brief Blog</h3>
<p>I&#8217;m glad I slammed Javascript in order to provoke my instructor.  It&#8217;s brought out all sorts of great learning on javascript.  Personally, I don&#8217;t like not knowing how to do things.  And for whatever reason, most people (even authors of Javascript books) haven&#8217;t really got to know Javascript the way that Crockford has&#8230; and its great to have an instructor that has learned from his material.  Douglas Crockford points out extensively how Javscript is used wrong and how much of its potential is hidden from people.  His book is a great eye opener for those that are interested in any sort of web development or development where Javascript excels!  I know this sounds twisted&#8230;.</p>
<p>I&#8217;m very excited about getting to know Javascript!   (the right way)</p>
<br />Posted in open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=118&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/11/16/back-to-the-javascript-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>
	</item>
		<item>
		<title>Reversing Firefox Tabs as an Extension</title>
		<link>http://andrewgrimo.wordpress.com/2009/11/15/reversing-firefox-tabs-as-an-extension/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/11/15/reversing-firefox-tabs-as-an-extension/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 05:36:37 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=115</guid>
		<description><![CDATA[Ok, so I&#8217;m trying something a little different here&#8230; a video of the results of my work .  My efforts here were to create an extension in lieu of modifying the source code in Firefox.  Previously in our class, we had to modify tabbing behaviour of Firefox in source code.  This time, we had to [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=115&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Ok, so I&#8217;m trying something a little different here&#8230; a video of the results of my work .  My efforts here were to <a title="Our class lab on modifying Tabbing by an Extension" href="https://wiki.mozilla.org/Education/Learning/ModifyBrowserExtension" target="_blank">create an extension in lieu of modifying the source code</a> in Firefox.  <a title="Our previous lab - Modify Firefox's code" href="https://wiki.mozilla.org/Education/Learning/ModifyBrowser" target="_blank">Previously in our class</a>, we had to <a title="My blog on Modifying the tabbing effect in code" href="http://andrewgrimo.wordpress.com/2009/11/05/reversing-added-tabs-on-firefox/" target="_blank">modify tabbing behaviour of Firefox in source code</a>.  This time, we had to reverse out our changes to the source code, and make the change via an extension instead.  My changes impact best on <a title="Firefox 3.5 - Download &amp; Information" href="http://en-us.www.mozilla.com/en-US/firefox/3.5.5/releasenotes/" target="_blank">Firefox 3.5.5</a> and my extension (which Roger Dicke helped with) can be <a title="Add Tab Left - Firefox 3.5.5 extension" href="http://matrix.senecac.on.ca/~agrimo/osd/AddTabLeft.xpi" target="_blank">downloaded here</a>.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='500' height='312' src='http://www.youtube.com/embed/9sFhzfOEmrM?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>You may notice&#8230; the video has &#8220;Screen Flow Demo&#8221; burned across it.  Maybe when I&#8217;m out of school and get a job, I&#8217;ll buy the $100 <a title="Screen Flow - screencasting software" href="http://www.telestream.net/screen-flow/overview.htm" target="_blank">screencast software</a> and upload a video without the watermark.  Until then&#8230; you get the watermark.</p>
<p>There were many obstacles with this extension, and on top, the behaviours aren&#8217;t completely tweaked for FF3.6 and 3.7.  I also had a lot of problems getting the extension to load in the browser at all and much of this took most of the time that I spent on it.</p>
<p>One of the things that I enjoyed learning about Extention Development in Firefox, was how the process works for inserting code&#8230; actually, I&#8217;m still taking that in, but for this task was how event handlers were used to capture activity in the browser so that one could modify or at least trigger off of that event.  That was mainly intriguing because I&#8217;m currently working on setting up <a title="Multi-touch controls on Thunderbird for Mac" href="http://andrewgrimo.wordpress.com/2009/09/28/thunderbird-multi-touch-for-mac/" target="_blank">multi-touch events for the Mac on Thunderbird</a>, and the eventuality there would be to have then extensible so that Extensions could modify the default behaviour that would be in place.  So event handling has a particular interest for me.</p>
<pre style="padding-left:30px;">var evt = document.createEvent("Events");
evt.initEvent("TabOpen", true, false);
t.dispatchEvent(evt);</pre>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;"><span style="line-height:18px;white-space:pre;font-size:small;"><span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;">Above is a snippet of code that creates the action of a tab being opened with whatever the default behaviour has been assigned.  So for the extension, this is the primary event that it establishing an event listener for the sake of monitoring. </span></span></span></p>
<pre style="padding-left:30px;">onLoad: function() {
   var container = gBrowser.tabContainer;
   container.addEventListener("TabOpen", this.onTabOpen, false);
   container.addEventListener("TabSelect", this.onTabSelect, false);
   container.addEventListener("TabMove", this.onTabSelect, false);
   window.addEventListener("unload", this.onUnload, false);
},</pre>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;"><span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;">So this was very intriguing for me, also largely due to the fact that I had done some <a title="Drupal CMS Website" href="http://drupal.org" target="_blank">Drupal</a> development over the summer while on a work term co-op and <a title="Drupal API - describing Hooks" href="http://api.drupal.org/api/group/hooks/6" target="_blank">Drupal also uses what they call &#8220;hooks&#8221;</a> in order to catch new behaviour as a web pages output is created as it pushes through the system.  In <a href="https://developer.mozilla.org/en/Building_an_Extension" target="_blank">Mozilla Extension development</a>, &#8220;hooks&#8221; are also the term that they use. </span></span></p>
<p>There were a number of pages that came in handy for me, so just to list them out without further adoo&#8230;</p>
<ul>
<li><a title="Building an Extension" href="https://developer.mozilla.org/en/Building_an_Extension" target="_blank">Building an Extension</a></li>
<li><a title="How to develop a Firefox Extension" href="http://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/" target="_blank">How to develop a Firefox extension</a>.  Oddly enough, I had problems getting my extension package formed properly, and this gave me the command line to run to ensure it&#8217;d work.</li>
<li><a title="Chrome Manifest Details" href="https://developer.mozilla.org/en/Chrome_Manifest#The_Chrome_Registry" target="_blank">Chrome Manifest Details</a></li>
<li><a href="https://developer.mozilla.org/en/XUL_Overlays" target="_blank">Overlays</a></li>
<li><a href="https://developer.mozilla.org/en/Install_Manifests" target="_blank">Install Manifests</a></li>
<li>A website with an excellent <a href="http://ted.mielczarek.org/code/mozilla/extensionwiz/" target="_blank">Extension generator</a> that someone developed</li>
</ul>
<br />Posted in open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=115&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/11/15/reversing-firefox-tabs-as-an-extension/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>
	</item>
		<item>
		<title>Reversing Added Tabs on Firefox</title>
		<link>http://andrewgrimo.wordpress.com/2009/11/05/reversing-added-tabs-on-firefox/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/11/05/reversing-added-tabs-on-firefox/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 00:07:51 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=107</guid>
		<description><![CDATA[Today in my Open Source Development Course at  Seneca College, we were given a lab to do.  It was related to opening a link into a new tab.  The current behaviour for Firefox 3.5 is to open the new tab at the end of your list of tabs.  The task for this lab, is to [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=107&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p style="text-align:left;">Today in my <a title="OSD600 - Open Source Development" href="http://zenit.senecac.on.ca/wiki/index.php/DPS909_and_OSD600_Fall_2009_Weekly_Schedule#Week_7_.28Nov_2.29_.E2.80.93_Modifying_the_Browser_--_In_Tree" target="_blank">Open Source Development Course</a> at  <a title="School of Computer Studies - OSD600" href="https://scs.senecac.on.ca/course/osd600" target="_blank">Seneca College</a>, we were given a <a title="Lab for Modifying Browser tabbing" href="https://wiki.mozilla.org/Education/Learning/ModifyBrowser" target="_blank">lab to do</a>.  It was related to opening a link into a new tab.  The current behaviour for <a title="Current Release is FF 3.5.5 - this will change with time" href="http://www.mozilla.com/en-US/firefox/upgrade.html" target="_blank">Firefox 3.5</a> is to open the new tab at the end of your list of tabs.  The task for this lab, is to follow through the our professors instructions and make a fix in the related file that will make the new tab populate directly on the right hand side of your current tab.  Then create a patch from the changes you made and post them for others to try it.  So I&#8217;ve done this&#8230; but with a twist.  Let me explain.</p>
<p><img class="aligncenter size-full wp-image-108" title="Many Browsers to choose" src="http://andrewgrimo.files.wordpress.com/2009/11/manybrowsers.jpg?w=500" alt="Many Browsers to choose"   /></p>
<h3>The Many Browsers</h3>
<p>Why so many browsers you ask.  Well here are the browsers in the picture above in order from left to right.  First is <a title="Apple's web browser for Mac and PC" href="http://www.apple.com/safari/" target="_blank">Safari</a>, then <a title="A Mozilla browser dedicated in design... for the Mac!" href="http://caminobrowser.org/" target="_blank">Camino</a>&#8230; then the first <a title="Current version at time of post is 3.5.5" href="http://www.mozilla.com/en-US/firefox/upgrade.html" target="_blank">Firefox which is the current formal release v3.5.5</a>&#8230; then is one many people might not be familiar with due to its name &#8220;MinefieldDebug&#8221;.  This is a special one.  It is a build of the latest development version of Firefox and has not endured the thorough testing that official releases or candidate betas have experienced.  This item represents my own locally stored Firefox source code for my own learning and development efforts with it.  I compile it on my own system, but anyone can download compiled and packaged versions of the <a title="Current Firefox nightly builds are at v3.7" href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/" target="_blank">nightly development builds</a>.  The last Firefox browser in the list is the <a title="Go here to read about it or download and try it out" href="http://www.mozilla.com/en-US/firefox/3.6b1/releasenotes/" target="_blank">Firefox 3.6 Beta1 candidate release</a>.</p>
<h3>My Standard Fare</h3>
<p>Since the beginning of my Open Source course this semester I&#8217;ve been using the MinefieldDebug browser alot as my regular web browser because I really like some of the features that they&#8217;ve introduced into it.  Lately, I was offered to try the latest Firefox Beta for v3.6 while I was in an<a title="Mozilla's Mac QA chat room" href="irc://irc.mozilla.org/macqa"> IRC chat room</a> where the Mac Quality team for Mozilla tends to reside.  From getting familiar with both of these browsers, I realized that what the lab for my course is asking us to do&#8230; has already been done in the newest versions!</p>
<h3>Undo what has been done&#8230; or just Reverse it</h3>
<p style="text-align:left;">So I mentioned this to our instructor and he mentioned the idea of just giving it a different behavior.  So I decided to reverse where the tab gets placed&#8230; by putting it on the left hand side of the current tab instead of the right.  <a title="Patch for reversing tabs... for Minefield v3.7" href="http://matrix.senecac.on.ca/~agrimo/osd/reverseTabFF3.7.patch">Here is the patch that makes it all happen</a>&#8230; and here&#8217;s a picture of it for those that don&#8217;t want to bother downloading it.  (the picture will show what code was replaced/changed to suit the result).</p>
<blockquote>
<p style="text-align:left;">as a note&#8230; this patch was applied to my Firefox 3.7 development code</p>
</blockquote>
<p><a href="http://matrix.senecac.on.ca/~agrimo/osd/reverseTabFF3.7.patch"><img class="aligncenter size-full wp-image-109" title="Picture of the patch to reverse tabbing direction" src="http://andrewgrimo.files.wordpress.com/2009/11/patchpicture.jpg?w=500&#038;h=281" alt="Picture of the patch to reverse tabbing direction" width="500" height="281" /></a></p>
<p>For those that are new&#8230; the lines with the &#8216;  &#8211; &#8216; sign are what were replaced&#8230; and the line with the &#8216; + &#8216; sign is the new code.  Pretty simple looking&#8230;. the trick is finding the proper place in the whole code repository for Firefox, and then once you find the right file, you still need to find the right function to do the changes in&#8230; and then hope that your changes not only work properly, but don&#8217;t break anything else.</p>
<p>With this change that I made above, it deviated from our instructors notes so I had to do some searching myself.  My first couple of attempts made the tabs appear almost randomly around the window.  Some went left, others right&#8230; no real predictability to it.  This minor change that I made seems to work.  But there could be bugs that might show up aswell.  To thoroughly make this be accepted into an official release of Firefox would certainly take alot more work then just getting the code to work.  But I could build an extension using this idea&#8230; hummm&#8230;. maybe over the holiday if things slow down then.   :  )</p>
<br />Posted in open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=107&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/11/05/reversing-added-tabs-on-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/11/manybrowsers.jpg" medium="image">
			<media:title type="html">Many Browsers to choose</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/11/patchpicture.jpg" medium="image">
			<media:title type="html">Picture of the patch to reverse tabbing direction</media:title>
		</media:content>
	</item>
		<item>
		<title>FSOSS, Community and Networking with Others</title>
		<link>http://andrewgrimo.wordpress.com/2009/11/02/fsoss-community-and-networking-with-others/</link>
		<comments>http://andrewgrimo.wordpress.com/2009/11/02/fsoss-community-and-networking-with-others/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 14:40:08 +0000</pubDate>
		<dc:creator>Andrew Grimo</dc:creator>
				<category><![CDATA[community]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://andrewgrimo.wordpress.com/?p=100</guid>
		<description><![CDATA[An interesting week I&#8217;ve just had, everything from Mennonite farms and their quilt auctions to an Open Source gathering and related workshops and a CIPS gathering held by the Toronto CIPS group and workshop on a very specific topic &#8211; Networking Strategies for Career Development.  How do they all relate?  It&#8217;s simple actually. Toronto Community [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=100&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>An interesting week I&#8217;ve just had, everything from <a href="http://en.wikipedia.org/wiki/Mennonite" target="_blank">Mennonite</a> <a href="http://en.wikipedia.org/wiki/St._Jacobs,_Ontario" target="_blank">farms and their quilt auctions</a> to an <a href="http://fsoss.senecac.on.ca/2009/" target="_blank">Open Source gathering</a> and related workshops and a<a href="http://www.cips.ca/" target="_blank"> CIPS</a> gathering held by the <a href="http://www.cipstoronto.ca/" target="_blank">Toronto CIPS group</a> and workshop on a very specific topic &#8211; Networking Strategies for Career Development.  How do they all relate?  It&#8217;s simple actually.</p>
<p><img class="aligncenter size-full wp-image-101" title="Calendar of Events for my last week of October" src="http://andrewgrimo.files.wordpress.com/2009/11/calendar.png?w=500&#038;h=97" alt="Calendar of Events for my last week of October" width="500" height="97" /></p>
<h3>Toronto Community</h3>
<p>First it started with the Toronto chapter of CIPS doing a presentation on networking with others in order to develop your career.  In essence, its about building relationships or community with others.  It&#8217;s about sharing information, developing credibility, working with people who have common interests and asking questions and listening to others.  Networking is a pretty wonderful thing actually.  It&#8217;s kind of like socializing in the context of career and professional development as opposed to just being a poker night with the boys, or visiting with the neighbors across the street.  In the context of the formula above, the products are all IT sectors in the Toronto area, and the market reach of this particular group is the GTA.  These two together define its &#8220;communities&#8221; borders or scope.</p>
<h3>St. Jacobs Mennonite Community</h3>
<p>How does a Mennonite community mesh into this you ask&#8230; they don&#8217;t even have electricity!   For those of you who don&#8217;t know, St. Jacobs is predominantly a farm area just outside of Toronto that is made up of a large Mennonite community, most easily recognized by their horse drawn carriages which are their primary means of travel, their lack of electricity in their home and their unique way of dressing that makes you think that you are amongst very tall Hobbits or back in the days of &#8220;Little House on the Prairie&#8221;.  They&#8217;re all very graceful and seem genuinely very kind to everyone, my intention is to define what sets them apart and to highlight their strong sense of community.</p>
<p>In relationship to this blog, St. Jacobs happens to be something I encountered in the same week as FSOSS and the CIPS events.  And for another, the coincidence of seeing a variety of communities interacting and being involved created a noteworthy reason for writing on all of the experiences to help really emphasize a point, &#8220;community&#8221;.</p>
<p>In St. Jacobs, I saw a close nit group of people, all involved in a simple common goal.  That is living and working off the land, supporting and trading efforts within their community, and providing their goods to the community at large around them.  They have their own defined scope or size of their community (which is probably defined on how far they can get with their horse and carriages), they have their main market of goods, which tend to be produce grown on their farms, pies, quilt making and a variety of other outlets that they tend to.  For them, this lifestyle defines their communities unique qualities where everyone seems to contribute to make it all happen.</p>
<h3>Tying it together to the Open Source Community</h3>
<p>The CIPS community is more closely related to the Open Source world, at least they are both involved in the same professional world of information technology.  But all of these communities have their market accounted for.  Scope is a bit different though. The software industry is not bound by horse and buggies.  The Toronto CIPS group has a territory defined to support those in the local Toronto community to come together, share, and connect with others through locally held events.</p>
<p><strong>Open Source Community<br />
</strong>The Open Source Community is an interesting twist to all of these.  It&#8217;s products are all offered for Free, which is something that uniquely belongs to this community&#8217;s commodities.  It&#8217;s involved participants span the reaches of wherever the internet can reach, no regional or horse and buggy boundaries here.  And with all of this, the open source community truly does have a sense of &#8220;community&#8221;.</p>
<p><strong>FSOSS!</strong><br />
The Free Software Open Source Symposium is a community event for the open source world.  It is a coming together of like minds, a building of relationships, a sharing of information, a chance to ask questions and listen to others.  It is a networking event establishing a place for the smaller clusters of Open Source developers and users to experience and explore the bigger &#8220;community&#8221; which they are all an integral part of.</p>
<h3>Community &amp; Networking are the Key</h3>
<p>Even though the scope of these communities is business in orientation, it is this social connectedness that brings our humanity into it and makes it alive.  Our ability to help others, establish trust through our ability to deliver and communicate, and its richness is created by the integrity that we individually bring.  These ideas are part of the defining factors of networking with others, but they are intimately involved in developing the community of our professional lives.</p>
<br />Posted in community, open source  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andrewgrimo.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andrewgrimo.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andrewgrimo.wordpress.com&#038;blog=9426013&#038;post=100&#038;subd=andrewgrimo&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andrewgrimo.wordpress.com/2009/11/02/fsoss-community-and-networking-with-others/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e921a25458d9de21daeff755de450c16?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andrewgrimo</media:title>
		</media:content>

		<media:content url="http://andrewgrimo.files.wordpress.com/2009/11/calendar.png" medium="image">
			<media:title type="html">Calendar of Events for my last week of October</media:title>
		</media:content>
	</item>
	</channel>
</rss>
