<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Jammastergoat - dojo.hitch</title>
	<atom:link href="http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/feed/" rel="self" type="application/rss+xml" />
	<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/</link>
	<description>The definitive resource for all things Dojo: past, present, future.</description>
	<pubDate>Thu, 24 Jul 2008 05:45:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: DojoCampus &#187; Blog Archive &#187; Dojo and Air, a fancy file uploader</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-69</link>
		<dc:creator>DojoCampus &#187; Blog Archive &#187; Dojo and Air, a fancy file uploader</dc:creator>
		<pubDate>Wed, 02 Apr 2008 09:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-69</guid>
		<description>[...] dojo.hitch method which takes all the heavy load of your shoulders. I recommend reading the cookie by Peter Higgins about dojo.hitch Note the third parameter passed to the dojo.hitch method. All parameters after the second one just [...]</description>
		<content:encoded><![CDATA[<p>[...] dojo.hitch method which takes all the heavy load of your shoulders. I recommend reading the cookie by Peter Higgins about dojo.hitch Note the third parameter passed to the dojo.hitch method. All parameters after the second one just [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DojoCampus &#187; Blog Archive &#187; Demystifying dojo.data</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-57</link>
		<dc:creator>DojoCampus &#187; Blog Archive &#187; Demystifying dojo.data</dc:creator>
		<pubDate>Tue, 25 Mar 2008 18:14:54 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-57</guid>
		<description>[...] absolutely love the way that it simplifies my life. While it's not quite as "magic" as dojo.hitch(), things "just work" when I use it. Many of the dijit widgets support being tied to data stores. The [...]</description>
		<content:encoded><![CDATA[<p>[...] absolutely love the way that it simplifies my life. While it&#8217;s not quite as &#8220;magic&#8221; as dojo.hitch(), things &#8220;just work&#8221; when I use it. Many of the dijit widgets support being tied to data stores. The [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: occident.us &#187; Blog Archive &#187; Dojo Cookies Make Curry</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-46</link>
		<dc:creator>occident.us &#187; Blog Archive &#187; Dojo Cookies Make Curry</dc:creator>
		<pubDate>Fri, 21 Mar 2008 16:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-46</guid>
		<description>[...] set of tutorials over at dojocampus.org cutely dubbed &#8220;cookies.&#8221; Reading through the article Alex highlights on dojo.hitch I even learned something new. Turns out dojo.hitch isn&#8217;t just a nice tool for [...]</description>
		<content:encoded><![CDATA[<p>[...] set of tutorials over at dojocampus.org cutely dubbed &#8220;cookies.&#8221; Reading through the article Alex highlights on dojo.hitch I even learned something new. Turns out dojo.hitch isn&#8217;t just a nice tool for [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Continuing Intermittent Incoherency</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-42</link>
		<dc:creator>Continuing Intermittent Incoherency</dc:creator>
		<pubDate>Thu, 20 Mar 2008 08:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-42</guid>
		<description>[...] Higgins has an excellent article up that covers dojo.hitch(), and in general the Dojo Cookies series over at dojocampus.org is rocking [...]</description>
		<content:encoded><![CDATA[<p>[...] Higgins has an excellent article up that covers dojo.hitch(), and in general the Dojo Cookies series over at dojocampus.org is rocking [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rcoup</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-41</link>
		<dc:creator>rcoup</dc:creator>
		<pubDate>Sun, 16 Mar 2008 03:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-41</guid>
		<description>dojo.hitch() is also fantastic for interacting with third party APIs. Since nobody wants nasty global-namespaced functions, we can use hitch to tidy it up. Here's a simple Google Maps example, since the GEvent functions don't support any scoping.

dojo.provide("my.maps");

dojo.mixin(my.maps, {
  savedPoint: null,

  onMapClick: function(overlay, point) {
    // since we used dojo.hitch() this is called with this==my.maps, which is what we want
    this.updateSavedPoint(point);
  },
  updateSavedPoint: function(point) {
    this.savedPoint = point;
  }
});

// connect our GMaps event listener, and use the my.maps scope for our handler
var eh = GEvent.addListener(gmap, "click", dojo.hitch(my.maps, "onMapClick"));</description>
		<content:encoded><![CDATA[<p>dojo.hitch() is also fantastic for interacting with third party APIs. Since nobody wants nasty global-namespaced functions, we can use hitch to tidy it up. Here&#8217;s a simple Google Maps example, since the GEvent functions don&#8217;t support any scoping.</p>
<p>dojo.provide(&#8221;my.maps&#8221;);</p>
<p>dojo.mixin(my.maps, {<br />
  savedPoint: null,</p>
<p>  onMapClick: function(overlay, point) {<br />
    // since we used dojo.hitch() this is called with this==my.maps, which is what we want<br />
    this.updateSavedPoint(point);<br />
  },<br />
  updateSavedPoint: function(point) {<br />
    this.savedPoint = point;<br />
  }<br />
});</p>
<p>// connect our GMaps event listener, and use the my.maps scope for our handler<br />
var eh = GEvent.addListener(gmap, &#8220;click&#8221;, dojo.hitch(my.maps, &#8220;onMapClick&#8221;));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pottedmeat</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-39</link>
		<dc:creator>pottedmeat</dc:creator>
		<pubDate>Sat, 15 Mar 2008 21:45:07 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-39</guid>
		<description>Correct!</description>
		<content:encoded><![CDATA[<p>Correct!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toonetown</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-38</link>
		<dc:creator>toonetown</dc:creator>
		<pubDate>Sat, 15 Mar 2008 19:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-38</guid>
		<description>Ok - so (as a reference for me in the future), the following code:

var foo = {attr:”an attribute”, debug: function(v, v2){console.log(this.attr + ” - ” + v + " - " + v2);}};
var val = “Me”;

dojo.hitch(foo, “debug”, val)(”Him”);

Will produce "an attribute - Me - Him"

Great!</description>
		<content:encoded><![CDATA[<p>Ok - so (as a reference for me in the future), the following code:</p>
<p>var foo = {attr:”an attribute”, debug: function(v, v2){console.log(this.attr + ” - ” + v + &#8221; - &#8221; + v2);}};<br />
var val = “Me”;</p>
<p>dojo.hitch(foo, “debug”, val)(”Him”);</p>
<p>Will produce &#8220;an attribute - Me - Him&#8221;</p>
<p>Great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pottedmeat</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-37</link>
		<dc:creator>pottedmeat</dc:creator>
		<pubDate>Sat, 15 Mar 2008 18:57:46 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-37</guid>
		<description>@toonetown, Hitch puts the hitched parameters at the beginning, and the new arguments at the end.

In the example above, since you're only using the first argument, it would log "Me". But in the second argument, you'd have your passed value of "Him".</description>
		<content:encoded><![CDATA[<p>@toonetown, Hitch puts the hitched parameters at the beginning, and the new arguments at the end.</p>
<p>In the example above, since you&#8217;re only using the first argument, it would log &#8220;Me&#8221;. But in the second argument, you&#8217;d have your passed value of &#8220;Him&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toonetown</title>
		<link>http://dojocampus.org/content/2008/03/15/jammastergoat-dojohitch/#comment-36</link>
		<dc:creator>toonetown</dc:creator>
		<pubDate>Sat, 15 Mar 2008 18:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://dojocampus.org/content/?p=64#comment-36</guid>
		<description>One question I've always had about hitch is a bit more explaination on the "positional" arguments...for example:

var foo = {attr:"an attribute", debug: function(v){console.log(this.attr + " - " + v);}};
var val = "Me";

dojo.hitch(foo, "debug", val)("Him");

What will be produced?  "an attribute - Me" or "an attribute - Him" ?

Does that make sense?  Does positional apply to when it's called or when it's defined?</description>
		<content:encoded><![CDATA[<p>One question I&#8217;ve always had about hitch is a bit more explaination on the &#8220;positional&#8221; arguments&#8230;for example:</p>
<p>var foo = {attr:&#8221;an attribute&#8221;, debug: function(v){console.log(this.attr + &#8221; - &#8221; + v);}};<br />
var val = &#8220;Me&#8221;;</p>
<p>dojo.hitch(foo, &#8220;debug&#8221;, val)(&#8221;Him&#8221;);</p>
<p>What will be produced?  &#8220;an attribute - Me&#8221; or &#8220;an attribute - Him&#8221; ?</p>
<p>Does that make sense?  Does positional apply to when it&#8217;s called or when it&#8217;s defined?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
