<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Beginning UI Design</title>
	<atom:link href="http://www.bigdoor.com/blog/beginning-ui-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bigdoor.com/blog/beginning-ui-design/</link>
	<description>Free gamification platform that helps companies increase their traffic and revenue through social rewards</description>
	<lastBuildDate>Fri, 03 Feb 2012 21:02:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Collin</title>
		<link>http://www.bigdoor.com/blog/beginning-ui-design/#comment-42</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Mon, 29 Mar 2010 16:34:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.bigdoor.com/?p=742#comment-42</guid>
		<description>I do think it is a good idea to have a function which iterates an array and processes the entries appropriately. The one thing I&#039;m wary about is adding that function to the prototype. In our case, it can cause major problems if we alter the Array prototype if a site that use our code does as well. Just a thought.

When you call that mapping function, I&#039;m confused as to where your e variable is coming from. Did you mean to pass an anonymous function in and call each handler that way?

this.events[event].map(function(e) { if(typeof e == &#039;function&#039;) { return e(); } })

Thanks for the input!</description>
		<content:encoded><![CDATA[<p>I do think it is a good idea to have a function which iterates an array and processes the entries appropriately. The one thing I&#8217;m wary about is adding that function to the prototype. In our case, it can cause major problems if we alter the Array prototype if a site that use our code does as well. Just a thought.</p>
<p>When you call that mapping function, I&#8217;m confused as to where your e variable is coming from. Did you mean to pass an anonymous function in and call each handler that way?</p>
<p>this.events[event].map(function(e) { if(typeof e == &#8216;function&#8217;) { return e(); } })</p>
<p>Thanks for the input!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shea Kauffman</title>
		<link>http://www.bigdoor.com/blog/beginning-ui-design/#comment-41</link>
		<dc:creator>Shea Kauffman</dc:creator>
		<pubDate>Tue, 23 Mar 2010 20:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.bigdoor.com/?p=742#comment-41</guid>
		<description>Why not add a map aspect to the array object:

      Array.prototype.map = function(fn) {
                    var arr = [];
                    var len = this.length;
                    for(i=0;i&lt;len;i++)
                    {
                        arr.push(fn(this[i]));
                    }
                    return arr;
                  };

Then:
var manager = {
events: {},
    trigger: function(event) {
        this.events[event].map( this.events[event][e])
    }
}</description>
		<content:encoded><![CDATA[<p>Why not add a map aspect to the array object:</p>
<p>      Array.prototype.map = function(fn) {<br />
                    var arr = [];<br />
                    var len = this.length;<br />
                    for(i=0;i&lt;len;i++)<br />
                    {<br />
                        arr.push(fn(this[i]));<br />
                    }<br />
                    return arr;<br />
                  };</p>
<p>Then:<br />
var manager = {<br />
events: {},<br />
    trigger: function(event) {<br />
        this.events[event].map( this.events[event][e])<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>

