<?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/"
	>

<channel>
	<title>Adam Christian &#187; XPCOM</title>
	<atom:link href="http://adamchristian.com/archives/tag/xpcom/feed" rel="self" type="application/rss+xml" />
	<link>http://adamchristian.com</link>
	<description>Writing about Life, Business and Technology - the way I see it.</description>
	<lastBuildDate>Sat, 04 Sep 2010 00:27:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>XUSH (.01), you know it&#8217;s fun to say.</title>
		<link>http://adamchristian.com/archives/121</link>
		<comments>http://adamchristian.com/archives/121#comments</comments>
		<pubDate>Wed, 28 Jan 2009 22:57:49 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Firefox]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Extension]]></category>
		<category><![CDATA[Mozmill]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Venkman]]></category>
		<category><![CDATA[XPCOM]]></category>
		<category><![CDATA[XUL]]></category>

		<guid isPermaLink="false">http://adamchristian.com/?p=121</guid>
		<description><![CDATA[Over the past 8 months I have been neck deep in XUL and XPCOM and with Venkman being as unintuitive as it is I have badly needed a shell with access to the trusted space in the browser. I also had a couple more requirements, which were that it was super easy to get at [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past 8 months I have been neck deep in <a href="http://www.mozilla.org/projects/xul/">XUL</a> and <a href="http://www.mozilla.org/projects/xpcom/">XPCOM</a> and with <a href="https://addons.mozilla.org/en-US/firefox/addon/216">Venkman</a> being as unintuitive as it is I have badly needed a shell with access to the trusted space in the browser. I also had a couple more requirements, which were that it was super easy to get at (keyboard shortcut), and that it looks awesome (transparency required).</p>
<p>Since making things looks really nice in <a href="http://www.mozilla.org/projects/xul/">XUL </a>is really hard, I decided that I would build the UI in the current Firefox content window (sorry <a href="http://www.mozillamessaging.com/en-US/">tbird</a> etc, but I built a less shiny version of this into <a href="http://code.google.com/p/mozmill/">Mozmill</a> trunk for all of you).</p>
<p>Some of the functionality that I decided was a top priority was some slightly abstracted access to the window mediator which I am calling &#8216;windows&#8217;, and is simply an array of all the different windows available in the whole browser. The other big one is dir(), I am constantly looking for a property in one of the many, many objects I am trying to access and now that is really easy.</p>
<p>All of that goodness combined with enough space to stick real code blocks and a full history (which you can access using the shift key and up/down arrows), I find myself pretty comfortable.</p>
<p>After <a href="http://adamchristian.com/stuff/xush-01.xpi">installing the extension</a>, you can <strong>simply press &#8216;meta (cmd on mac) + shift + s&#8217;</strong> and you should be greeted with the following (toggling will show/hide the shell):</p>
<p><strong>UPDATE: </strong>It was pointed out to me that on windows meta may not be bound, so I have updated both the extension and git, please try &#8216;alt+shift+ctrl+s&#8217; or &#8216;ctrl+shift+s&#8217; on windows/linux, (I am testing in a VM so it&#8217;s a bit strange. Sorry about the confusion!) </p>
<p> </p>
<div id="attachment_123" class="wp-caption alignnone" style="width: 624px"><img title="Welcome to XUSH" src="http://www.adamchristian.com/wp-content/uploads/2009/01/picture-13-1024x847.png" alt="Welcome to XUSH" width="614" height="508" /><p class="wp-caption-text">Welcome to XUSH</p></div>
<p>To get started, you can type &#8216;help&#8217; to see what is available to you.</p>
<div id="attachment_128" class="wp-caption alignnone" style="width: 831px"><img class="size-full wp-image-128 " title="Help Menu" src="http://www.adamchristian.com/wp-content/uploads/2009/01/picture-22.png" alt="Help Menu" width="821" height="206" /><p class="wp-caption-text">Help Menu</p></div>
<p> </p>
<p> </p>
<p>Other available functionality includes a big chunk of the <a href="http://code.google.com/p/mozmill/wiki/ControllerAPI" target="_blank">mozmill controller</a> for driving user actions in the browser, as well as <a href="http://code.google.com/p/mozmill/source/browse/trunk/mozmill/extension/resource/modules/elementslib.js" target="_blank">elementslib</a> &#8212; which gives you all kinds of powerful features for looking up nodes in the browser.</p>
<div id="attachment_127" class="wp-caption alignnone" style="width: 868px"><img class="size-full wp-image-127 " title="ElementsLib" src="http://www.adamchristian.com/wp-content/uploads/2009/01/picture-6.png" alt="ElementsLib" width="858" height="187" /><p class="wp-caption-text">ElementsLib</p></div>
<p>As I mentioned above, the windows helper can quickly give you an idea of what is open in the browser and let you directly access the objects in the windows[x] array.</p>
<div id="attachment_129" class="wp-caption alignnone" style="width: 840px"><img class="size-full wp-image-129 " title="Windows Helper" src="http://www.adamchristian.com/wp-content/uploads/2009/01/picture-3.png" alt="Windows Helper" width="830" height="149" /><p class="wp-caption-text">Windows Helper</p></div>
<p> </p>
<p>The nice big console gives you enough space (and using shift) you can do multiple line commands to actually execute code snippets:</p>
<div id="attachment_130" class="wp-caption alignnone" style="width: 676px"><img class="size-full wp-image-130 " title="Code Blocks" src="http://www.adamchristian.com/wp-content/uploads/2009/01/picture-5.png" alt="Code Blocks" width="666" height="218" /><p class="wp-caption-text">Code Blocks</p></div>
<p>My next round of features will include some more helpers, including tab completion and any bug fixes I find, please let me know of any that you find!</p>
<p>If you would like to play with the source, <a href="http://github.com/admc/xush/tree/master">I have it on github </a>and have a python script that uses <a href="http://code.google.com/p/mozrunner/">mozrunner</a> to launch it in dev mode (with venkman installed, although now I don&#8217;t really need it), but saves you from installing and uninstalling the extension every-time you want to try out your latest code changes:<br />
<code><br />
python xush.py<br />
</code></p>
<p>That should launch <a href="http://www.getfirefox.com">Firefox</a> with <a href="http://github.com/admc/xush/tree/master">XUSH</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/216">Venkman</a> both installed and allow you to hit the shortcut and wham, test away.</p>
<p>After another round of bug fixes I will be submitting this to <a href="https://addons.mozilla.org/en-US/firefox/">Mozilla AMO</a>.</p>
<p><strong>Other projects you might be into if this interests you:</strong></p>
<ul>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/216">Venkman</a></li>
<li><a href="http://code.google.com/p/mozmill/">Mozmill</a></li>
<li><a href="http://getfirebug.com/releases/chromebug/">Chomebug</a></li>
</ul>
<p>Thanks for your interest!</p>
]]></content:encoded>
			<wfw:commentRss>http://adamchristian.com/archives/121/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
