<?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 for Helephant.com</title>
	<atom:link href="http://helephant.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://helephant.com</link>
	<description></description>
	<lastBuildDate>Mon, 01 Feb 2010 01:30:39 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Why I don&#039;t like reset stylesheets by Tim</title>
		<link>http://helephant.com/2009/08/why-i-dont-like-reset-stylesheet/#comment-4610</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 01 Feb 2010 01:30:39 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1598#comment-4610</guid>
		<description>I prefer to use them. I have my own base reset though. Some things are redundant to reset like strong and em, but others are great, like stripping margins and padding. It&#039;s an easy way to start with a nice clean, blank canvas.</description>
		<content:encoded><![CDATA[<p>I prefer to use them. I have my own base reset though. Some things are redundant to reset like strong and em, but others are great, like stripping margins and padding. It&#8217;s an easy way to start with a nice clean, blank canvas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CSS3 Multiple background images by Alex G</title>
		<link>http://helephant.com/2009/11/css3-multiple-background-images/#comment-4598</link>
		<dc:creator>Alex G</dc:creator>
		<pubDate>Sun, 31 Jan 2010 11:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1694#comment-4598</guid>
		<description>Great post! I&#039;ve longed for wider support for multiple background images since WebKit first began supporting them a while back. The best bit is that the newly introduced CSS gradients also follow this rule when used with the background-image property. So we get multiple gradients as a bonus!</description>
		<content:encoded><![CDATA[<p>Great post! I&#8217;ve longed for wider support for multiple background images since WebKit first began supporting them a while back. The best bit is that the newly introduced CSS gradients also follow this rule when used with the background-image property. So we get multiple gradients as a bonus!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript anonymous functions by Dynamically change SearchSQL for an SSA field client-side - Hints, Tips and Tricks</title>
		<link>http://helephant.com/2008/08/javascript-anonymous-functions/#comment-4464</link>
		<dc:creator>Dynamically change SearchSQL for an SSA field client-side - Hints, Tips and Tricks</dc:creator>
		<pubDate>Mon, 25 Jan 2010 12:03:40 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=418#comment-4464</guid>
		<description>[...] we need to strip out the function name as when you assign a function to a variable it should be an anonymous function. To strip the name out we use the replace method [...]</description>
		<content:encoded><![CDATA[<p>[...] we need to strip out the function name as when you assign a function to a variable it should be an anonymous function. To strip the name out we use the replace method [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript anonymous functions by Javascript method context &#8211; Helephant.com</title>
		<link>http://helephant.com/2008/08/javascript-anonymous-functions/#comment-4025</link>
		<dc:creator>Javascript method context &#8211; Helephant.com</dc:creator>
		<pubDate>Fri, 08 Jan 2010 21:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=418#comment-4025</guid>
		<description>[...] How javascript objects workBuilding simple objectsFunctions are first class objects in javascriptJavascript anonymous functionsConstructor functionsJavascript closuresJavascript object prototypeJavascript prototype [...]</description>
		<content:encoded><![CDATA[<p>[...] How javascript objects workBuilding simple objectsFunctions are first class objects in javascriptJavascript anonymous functionsConstructor functionsJavascript closuresJavascript object prototypeJavascript prototype [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Functions are first class objects in javascript by Javascript method context &#8211; Helephant.com</title>
		<link>http://helephant.com/2008/08/functions-are-first-class-objects-in-javascript/#comment-4024</link>
		<dc:creator>Javascript method context &#8211; Helephant.com</dc:creator>
		<pubDate>Fri, 08 Jan 2010 21:33:46 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=417#comment-4024</guid>
		<description>[...] method context How javascript objects workBuilding simple objectsFunctions are first class objects in javascriptJavascript anonymous functionsConstructor functionsJavascript closuresJavascript object [...]</description>
		<content:encoded><![CDATA[<p>[...] method context How javascript objects workBuilding simple objectsFunctions are first class objects in javascriptJavascript anonymous functionsConstructor functionsJavascript closuresJavascript object [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript method context by helen</title>
		<link>http://helephant.com/2009/11/javascript-method-context/#comment-4023</link>
		<dc:creator>helen</dc:creator>
		<pubDate>Fri, 08 Jan 2010 21:28:11 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1646#comment-4023</guid>
		<description>The e parameter is the equivalent of event.srcElement in all browsers except IE. The element that triggered the event is passed in as the first parameter rather than being available as a static object like it is in IE. This will automatically be provided by the browser when the event is fired.

The parent function is addEvent() and the child function is the one created by this line:
wrapper = function(e) {
    handler.call(context, e);
}

When wrapper function is called, it will have access to all of the local variables in addEvent (element, eventName, handler, context, itself) but it will only use handler and context. This is because Javascript creates a closure:
http://helephant.com/2008/10/javascript-closures/

var n = function() and function n() result in exactly the same thing, a new function called n created in the current context. The difference is the first one is an operation while the second is a statement. You can use the function operator wherever it is valid to use a Javascript expression (in a loop, as a parameter to a function, as a return expression) so it&#039;s a lot more flexible. If you don&#039;t need the flexibility of the function operator, you can use either syntax.

There&#039;s more information in the anonymous function post:
http://helephant.com/2008/08/javascript-anonymous-functions/

I&#039;ve rewritten the two sections about event handlers to hopefully make them a bit clearer and given them better example. Hope this helps.</description>
		<content:encoded><![CDATA[<p>The e parameter is the equivalent of event.srcElement in all browsers except IE. The element that triggered the event is passed in as the first parameter rather than being available as a static object like it is in IE. This will automatically be provided by the browser when the event is fired.</p>
<p>The parent function is addEvent() and the child function is the one created by this line:<br />
wrapper = function(e) {<br />
    handler.call(context, e);<br />
}</p>
<p>When wrapper function is called, it will have access to all of the local variables in addEvent (element, eventName, handler, context, itself) but it will only use handler and context. This is because Javascript creates a closure:<br />
<a href="http://helephant.com/2008/10/javascript-closures/" rel="nofollow">http://helephant.com/2008/10/javascript-closures/</a></p>
<p>var n = function() and function n() result in exactly the same thing, a new function called n created in the current context. The difference is the first one is an operation while the second is a statement. You can use the function operator wherever it is valid to use a Javascript expression (in a loop, as a parameter to a function, as a return expression) so it&#8217;s a lot more flexible. If you don&#8217;t need the flexibility of the function operator, you can use either syntax.</p>
<p>There&#8217;s more information in the anonymous function post:<br />
<a href="http://helephant.com/2008/08/javascript-anonymous-functions/" rel="nofollow">http://helephant.com/2008/08/javascript-anonymous-functions/</a></p>
<p>I&#8217;ve rewritten the two sections about event handlers to hopefully make them a bit clearer and given them better example. Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript method context by martingaleh</title>
		<link>http://helephant.com/2009/11/javascript-method-context/#comment-3663</link>
		<dc:creator>martingaleh</dc:creator>
		<pubDate>Fri, 25 Dec 2009 16:17:34 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1646#comment-3663</guid>
		<description>Can you explain this sentence further as the &quot;e&quot; was a big surprise:

Javascript has a feature called closures so when you create an anonymous function inside another function, you can access local variables from the parent function. We can use this to reference the function context object when the anonymous function is run.

You have to click on full example to figure out what handler is.  I almost thought it was the button (as I&#039;m new at this) and not some function with the same name.

What&#039;s &quot;e&quot; for?

You say you need a closure... What are the local variables and what is the parent function.  Is the parent function? As there are many functions in your example, which one are you referring to with &quot;function context object&quot;.

Finally I noticed you&#039;ve used var n = function() and function n().  What is the difference between the two constructs?</description>
		<content:encoded><![CDATA[<p>Can you explain this sentence further as the &#8220;e&#8221; was a big surprise:</p>
<p>Javascript has a feature called closures so when you create an anonymous function inside another function, you can access local variables from the parent function. We can use this to reference the function context object when the anonymous function is run.</p>
<p>You have to click on full example to figure out what handler is.  I almost thought it was the button (as I&#8217;m new at this) and not some function with the same name.</p>
<p>What&#8217;s &#8220;e&#8221; for?</p>
<p>You say you need a closure&#8230; What are the local variables and what is the parent function.  Is the parent function? As there are many functions in your example, which one are you referring to with &#8220;function context object&#8221;.</p>
<p>Finally I noticed you&#8217;ve used var n = function() and function n().  What is the difference between the two constructs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Sweet error message that made me smile by Odul</title>
		<link>http://helephant.com/2009/08/sweet-error-message-that-made-me-smile/#comment-3482</link>
		<dc:creator>Odul</dc:creator>
		<pubDate>Thu, 17 Dec 2009 05:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1593#comment-3482</guid>
		<description>Wonderful feature too.  Honestly, I&#039;m not used to having options in these situations.  Apparently, Mozilla has confidence in me.  Bibble.</description>
		<content:encoded><![CDATA[<p>Wonderful feature too.  Honestly, I&#8217;m not used to having options in these situations.  Apparently, Mozilla has confidence in me.  Bibble.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CSS3 Multiple background images by Wil</title>
		<link>http://helephant.com/2009/11/css3-multiple-background-images/#comment-3230</link>
		<dc:creator>Wil</dc:creator>
		<pubDate>Sat, 05 Dec 2009 20:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1694#comment-3230</guid>
		<description>Somehow in IE8 I only see the background-color and none of the background-images. It does seem to load correctly, but it is immediately replaced with the background-color. Even if I add a IE-only conditional statement. 

Have a look at http://connecteu.hieruwwebsite.nl/ if you want, that&#039;s what I&#039;ve been working on. 

Thanks!</description>
		<content:encoded><![CDATA[<p>Somehow in IE8 I only see the background-color and none of the background-images. It does seem to load correctly, but it is immediately replaced with the background-color. Even if I add a IE-only conditional statement. </p>
<p>Have a look at <a href="http://connecteu.hieruwwebsite.nl/" rel="nofollow">http://connecteu.hieruwwebsite.nl/</a> if you want, that&#8217;s what I&#8217;ve been working on. </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CSS3 Multiple background images by helen</title>
		<link>http://helephant.com/2009/11/css3-multiple-background-images/#comment-3224</link>
		<dc:creator>helen</dc:creator>
		<pubDate>Sat, 05 Dec 2009 17:14:06 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1694#comment-3224</guid>
		<description>You have to put the background colour on the last background declaration:
background: url(&quot;multiple-background-bottom.png&quot;) repeat-x bottom,
            url(&quot;multiple-background-image.png&quot;) no-repeat bottom right,
            pink url(&quot;multiple-background-bg.png&quot;) no-repeat;

The browser works from last to first when painting the div so the last one is at the back and the first one is at the front. That&#039;s why the last one is the only one it makes sense to have a background colour on. If the browser painted a background colour when processing one of the other background declarations it would overwrite all the backgrounds that were underneath it. 

I&#039;m not sure what you mean by IE8. What&#039;s not working?</description>
		<content:encoded><![CDATA[<p>You have to put the background colour on the last background declaration:<br />
background: url(&#8221;multiple-background-bottom.png&#8221;) repeat-x bottom,<br />
            url(&#8221;multiple-background-image.png&#8221;) no-repeat bottom right,<br />
            pink url(&#8221;multiple-background-bg.png&#8221;) no-repeat;</p>
<p>The browser works from last to first when painting the div so the last one is at the back and the first one is at the front. That&#8217;s why the last one is the only one it makes sense to have a background colour on. If the browser painted a background colour when processing one of the other background declarations it would overwrite all the backgrounds that were underneath it. </p>
<p>I&#8217;m not sure what you mean by IE8. What&#8217;s not working?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on CSS3 Multiple background images by Wil</title>
		<link>http://helephant.com/2009/11/css3-multiple-background-images/#comment-3205</link>
		<dc:creator>Wil</dc:creator>
		<pubDate>Fri, 04 Dec 2009 17:14:39 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1694#comment-3205</guid>
		<description>Hi Helen, very nice post. I&#039;ve applied multiple backgrounds to a new site and added a single background for browsers who don&#039;t support it yet. 

I&#039;ve also applied a background-color to the divs with multiple backgrounds. It seems that you can&#039;t use this in a one-line statement, such as: 
background: #fff url(/image1.png), url(/image2.png); 
Is this correct? To make it work, I have to add the background-color after I set the background-images. 

All works fine in FF and IE7, but in IE8 only the background-color is shown. Might there be a solution to this? 

Best wishes, 

Wil</description>
		<content:encoded><![CDATA[<p>Hi Helen, very nice post. I&#8217;ve applied multiple backgrounds to a new site and added a single background for browsers who don&#8217;t support it yet. </p>
<p>I&#8217;ve also applied a background-color to the divs with multiple backgrounds. It seems that you can&#8217;t use this in a one-line statement, such as:<br />
background: #fff url(/image1.png), url(/image2.png);<br />
Is this correct? To make it work, I have to add the background-color after I set the background-images. </p>
<p>All works fine in FF and IE7, but in IE8 only the background-color is shown. Might there be a solution to this? </p>
<p>Best wishes, </p>
<p>Wil</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Building simple objects by adel</title>
		<link>http://helephant.com/2008/08/building-simple-objects/#comment-3103</link>
		<dc:creator>adel</dc:creator>
		<pubDate>Sun, 29 Nov 2009 23:46:31 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=407#comment-3103</guid>
		<description>Good article</description>
		<content:encoded><![CDATA[<p>Good article</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript method context by Javascript prototype chaining &#8211; Helephant.com</title>
		<link>http://helephant.com/2009/11/javascript-method-context/#comment-3102</link>
		<dc:creator>Javascript prototype chaining &#8211; Helephant.com</dc:creator>
		<pubDate>Sun, 29 Nov 2009 20:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1646#comment-3102</guid>
		<description>[...] functionsJavascript closuresJavascript object prototypeJavascript prototype chainingJavascript method contextPrototype chaining is used to build new types of objects based on existing ones. It has a very [...]</description>
		<content:encoded><![CDATA[<p>[...] functionsJavascript closuresJavascript object prototypeJavascript prototype chainingJavascript method contextPrototype chaining is used to build new types of objects based on existing ones. It has a very [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript closures by Javascript method context &#8211; Helephant.com</title>
		<link>http://helephant.com/2008/10/javascript-closures/#comment-3101</link>
		<dc:creator>Javascript method context &#8211; Helephant.com</dc:creator>
		<pubDate>Sun, 29 Nov 2009 18:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=419#comment-3101</guid>
		<description>[...] has a feature called closures so when you create an anonymous function inside another function, you can access local variables [...]</description>
		<content:encoded><![CDATA[<p>[...] has a feature called closures so when you create an anonymous function inside another function, you can access local variables [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Constructor functions by Javascript method context &#8211; Helephant.com</title>
		<link>http://helephant.com/2008/09/constructor-functions/#comment-3100</link>
		<dc:creator>Javascript method context &#8211; Helephant.com</dc:creator>
		<pubDate>Sun, 29 Nov 2009 18:27:44 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=408#comment-3100</guid>
		<description>[...] the previous examples you might have noticed that we use this to get a reference to the object that a function belongs to [...]</description>
		<content:encoded><![CDATA[<p>[...] the previous examples you might have noticed that we use this to get a reference to the object that a function belongs to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript closures by Javascript prototype chaining &#8211; Helephant.com</title>
		<link>http://helephant.com/2008/10/javascript-closures/#comment-3099</link>
		<dc:creator>Javascript prototype chaining &#8211; Helephant.com</dc:creator>
		<pubDate>Sun, 29 Nov 2009 18:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=419#comment-3099</guid>
		<description>[...] to use javascript&#8217;s strengths as a dynamic language with features like first class functions, closures and anonymous functions to write concise and modular code rather than trying to make it act like a [...]</description>
		<content:encoded><![CDATA[<p>[...] to use javascript&#8217;s strengths as a dynamic language with features like first class functions, closures and anonymous functions to write concise and modular code rather than trying to make it act like a [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Measuring element dimensions and placement in javascript by helen</title>
		<link>http://helephant.com/2005/08/measuring-element-dimensions-and-placement-in-javascript/#comment-3088</link>
		<dc:creator>helen</dc:creator>
		<pubDate>Sat, 28 Nov 2009 19:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=144#comment-3088</guid>
		<description>Sorry! I don&#039;t know anything about that framework.</description>
		<content:encoded><![CDATA[<p>Sorry! I don&#8217;t know anything about that framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Measuring element dimensions and placement in javascript by Fabrizio</title>
		<link>http://helephant.com/2005/08/measuring-element-dimensions-and-placement-in-javascript/#comment-3047</link>
		<dc:creator>Fabrizio</dc:creator>
		<pubDate>Thu, 26 Nov 2009 20:41:22 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=144#comment-3047</guid>
		<description>Hello Helen
am an Italian boy, precisely from Florence, I really like your tutorials on Javascript, and I wanted to ask if you know Coolite, I do not know javascript well and I&#039;d like to give me help to understand better how coolite work.
Thanks a lot  and see you soon
Fabrizio</description>
		<content:encoded><![CDATA[<p>Hello Helen<br />
am an Italian boy, precisely from Florence, I really like your tutorials on Javascript, and I wanted to ask if you know Coolite, I do not know javascript well and I&#8217;d like to give me help to understand better how coolite work.<br />
Thanks a lot  and see you soon<br />
Fabrizio</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript object prototype by helen</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-2964</link>
		<dc:creator>helen</dc:creator>
		<pubDate>Mon, 23 Nov 2009 16:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-2964</guid>
		<description>I also think that whether you want to use prototypes or not, it&#039;s good to understand what they are so you can make an informed choice and so you can understand what other people&#039;s code is doing. 

I think it&#039;s particularly helpful if you are using a Javascript library because many of them use prototypes to simulate classic inheritance and if things go wrong it&#039;s really hard to debug without understanding what&#039;s going on. 

That said.. I should update my article with a more convincing argument in the object prototype&#039;s favour. :)</description>
		<content:encoded><![CDATA[<p>I also think that whether you want to use prototypes or not, it&#8217;s good to understand what they are so you can make an informed choice and so you can understand what other people&#8217;s code is doing. </p>
<p>I think it&#8217;s particularly helpful if you are using a Javascript library because many of them use prototypes to simulate classic inheritance and if things go wrong it&#8217;s really hard to debug without understanding what&#8217;s going on. </p>
<p>That said.. I should update my article with a more convincing argument in the object prototype&#8217;s favour. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript object prototype by Ron</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-2963</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Mon, 23 Nov 2009 16:43:08 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-2963</guid>
		<description>To John Middlemas:

The Pet.prototype.sayHello example is simplistic to illustrate the idea.  In the real world, javascript classes are much more significant in size, and can have rather large methods.  If I have 1000 instances of an object, without prototype I would have 1000 instances of that large method as well.  With prototype, the sayHello method will be included but only as a reference to the single existing method, which translates to a significant reduction in memory usage.  
I&#039;m all for simplified programming, but would have to defend prototype as a necessity.</description>
		<content:encoded><![CDATA[<p>To John Middlemas:</p>
<p>The Pet.prototype.sayHello example is simplistic to illustrate the idea.  In the real world, javascript classes are much more significant in size, and can have rather large methods.  If I have 1000 instances of an object, without prototype I would have 1000 instances of that large method as well.  With prototype, the sayHello method will be included but only as a reference to the single existing method, which translates to a significant reduction in memory usage.<br />
I&#8217;m all for simplified programming, but would have to defend prototype as a necessity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript closures by helen</title>
		<link>http://helephant.com/2008/10/javascript-closures/#comment-2946</link>
		<dc:creator>helen</dc:creator>
		<pubDate>Sun, 22 Nov 2009 21:05:10 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=419#comment-2946</guid>
		<description>Thanks very much! I&#039;ve updated the link. :)</description>
		<content:encoded><![CDATA[<p>Thanks very much! I&#8217;ve updated the link. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript closures by rajakvk</title>
		<link>http://helephant.com/2008/10/javascript-closures/#comment-2945</link>
		<dc:creator>rajakvk</dc:creator>
		<pubDate>Sun, 22 Nov 2009 19:50:51 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=419#comment-2945</guid>
		<description>Broken link
Javascript closures for dummies - http://blog.morrisjohns.com/javascript_closures_for_dummies</description>
		<content:encoded><![CDATA[<p>Broken link<br />
Javascript closures for dummies &#8211; <a href="http://blog.morrisjohns.com/javascript_closures_for_dummies" rel="nofollow">http://blog.morrisjohns.com/javascript_closures_for_dummies</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Saving server control properties to ViewState with custom attributes by Jeff G.</title>
		<link>http://helephant.com/2008/08/saving-server-control-properties-to-viewstate-with-custom-attributes/#comment-2832</link>
		<dc:creator>Jeff G.</dc:creator>
		<pubDate>Tue, 17 Nov 2009 13:38:40 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=402#comment-2832</guid>
		<description>There&#039;s a more efficient way to do this in the recent version of C#:

public class PieControl1 : Control
{
    …
    public int Pies
    {
        get { return (int) (ViewState[&quot;Pies&quot;] ?? 0); }
        set { ViewState[&quot;Pies&quot;] = value; }
    }
}

The new ?? operator says, &quot;Use the value if it is not null, or else use the second operand if it is.&quot; So if ViewState[&quot;Pies&quot;] is null, a 0 will be returned. Otherwise, the value of ViewState[&quot;Pies&quot;] will be returned.</description>
		<content:encoded><![CDATA[<p>There&#8217;s a more efficient way to do this in the recent version of C#:</p>
<p>public class PieControl1 : Control<br />
{<br />
    …<br />
    public int Pies<br />
    {<br />
        get { return (int) (ViewState["Pies"] ?? 0); }<br />
        set { ViewState["Pies"] = value; }<br />
    }<br />
}</p>
<p>The new ?? operator says, &#8220;Use the value if it is not null, or else use the second operand if it is.&#8221; So if ViewState["Pies"] is null, a 0 will be returned. Otherwise, the value of ViewState["Pies"] will be returned.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript prototype chaining by Starrow Pan</title>
		<link>http://helephant.com/2009/08/javascript-prototype-chaining/#comment-2785</link>
		<dc:creator>Starrow Pan</dc:creator>
		<pubDate>Sun, 15 Nov 2009 03:43:18 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.com/?p=1252#comment-2785</guid>
		<description>&#039;When you look at the constructor property of the rufus object, rufus doesn’t have a value set explicitly on it so it looks for it on the Cat’s prototype object where it is set to Pet.&#039;
But rufus is created with a new keyword and function Cat(), it should has a constructor property of value Cat(). Actually in my test, when Cat.prototype=new Pet() is commented, rufus exhibits its constructor property as Cat(). 
Can you explain it more?</description>
		<content:encoded><![CDATA[<p>&#8216;When you look at the constructor property of the rufus object, rufus doesn’t have a value set explicitly on it so it looks for it on the Cat’s prototype object where it is set to Pet.&#8217;<br />
But rufus is created with a new keyword and function Cat(), it should has a constructor property of value Cat(). Actually in my test, when Cat.prototype=new Pet() is commented, rufus exhibits its constructor property as Cat().<br />
Can you explain it more?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Javascript object prototype by Starrow Pan</title>
		<link>http://helephant.com/2009/01/javascript-object-prototype/#comment-2757</link>
		<dc:creator>Starrow Pan</dc:creator>
		<pubDate>Fri, 13 Nov 2009 06:46:26 +0000</pubDate>
		<guid isPermaLink="false">http://helephant.net/?p=410#comment-2757</guid>
		<description>Appreciate your article that make me capable of appreciating the simplicity and ingenuity of the design of javascript.
@John,
At least per my experiment in Firebug js console, prototype is shared to all instances.
I think another advantage of prototype is it exhibits the dynamic essence of javascript. Of course you can declare properties and functions with a constructor, but prototype enable you modify the common behavior of a &#039;class&#039; of objects LATER.</description>
		<content:encoded><![CDATA[<p>Appreciate your article that make me capable of appreciating the simplicity and ingenuity of the design of javascript.<br />
@John,<br />
At least per my experiment in Firebug js console, prototype is shared to all instances.<br />
I think another advantage of prototype is it exhibits the dynamic essence of javascript. Of course you can declare properties and functions with a constructor, but prototype enable you modify the common behavior of a &#8216;class&#8217; of objects LATER.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
