<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://devlicious.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sergio Pereira - All Comments</title><link>http://devlicious.com/blogs/sergio_pereira/default.aspx</link><description>There are no half-solutions because there isn&amp;#39;t half a problem</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#111152</link><pubDate>Mon, 13 May 2013 20:30:25 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:111152</guid><dc:creator>sergiopereira</dc:creator><description>&lt;p&gt;@Alexey, I did override the entire prototype but in this case the prototype was empty and I had no use for the constructor property. I was only trying to explain how constructors behave.&lt;/p&gt;
&lt;p&gt;But you&amp;#39;re right, the way you suggested is recommended over what I showed.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=111152" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#111151</link><pubDate>Mon, 13 May 2013 18:23:26 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:111151</guid><dc:creator>Alexey Poklonskiy</dc:creator><description>&lt;p&gt;Is this really what you wanted to do?&lt;/p&gt;
&lt;p&gt;// declaring instance methods &amp;nbsp;&lt;/p&gt;
&lt;p&gt;ArrayMaker.prototype = { &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;someMethod: function () { &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alert( &amp;#39;someMethod called&amp;#39;); &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}, &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;getArray: function () { &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return this.theArray; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;} &amp;nbsp;&lt;/p&gt;
&lt;p&gt;}; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;In this way you&amp;#39;ve overridden the &amp;nbsp;ArrayMaker.prototype that was created by JS when you created ArrayMaker function. The (possibly) unwanted effect of it is that Array.Maker.prototype has lost the constructor property that was pointing at the ArrayMaker function.&lt;/p&gt;
&lt;p&gt;Wouldn&amp;#39;t the code below be better to preserve the OO style?&lt;/p&gt;
&lt;p&gt;ArrayMaker.prototype.someMethod = function () { &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alert( &amp;#39;someMethod called&amp;#39;); &amp;nbsp;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;ArrayMaker.prototype.getArray = function () { &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return this.theArray; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;} &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=111151" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#111147</link><pubDate>Sat, 11 May 2013 18:52:54 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:111147</guid><dc:creator>Web design tutor HASSAN</dc:creator><description>&lt;p&gt;This is an awesome tutorial. This tutorial helped me to understand how to teach my students.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=111147" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#111146</link><pubDate>Sat, 11 May 2013 18:48:51 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:111146</guid><dc:creator>Web design by mehedi</dc:creator><description>&lt;p&gt;This is an awesome explanation. This helped me a lot to understand how to teach a student.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=111146" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#75067</link><pubDate>Sat, 02 Feb 2013 06:56:53 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:75067</guid><dc:creator>wecode</dc:creator><description>&lt;p&gt;Beautiful... I found what i was looking for. Had a issue with function call it was working with the event but not with the javascript call sorted out &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=75067" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#71693</link><pubDate>Tue, 22 Jan 2013 11:18:41 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:71693</guid><dc:creator>cent</dc:creator><description>&lt;p&gt;...something I almost forgotted: all javascript libraries nowadays use self-invoking anonymous functions which I find way beyond the programming standards of other languages.&lt;/p&gt;
&lt;p&gt;I simply prefer the construction of an empty object and everything added upon it afterwards:&lt;/p&gt;
&lt;p&gt;//construct a global Function object&lt;/p&gt;
&lt;p&gt;function MYLIB(){}&lt;/p&gt;
&lt;p&gt;//a built-in type as property&lt;/p&gt;
&lt;p&gt;MYLIB.property1=&amp;quot;abc&amp;quot;&lt;/p&gt;
&lt;p&gt;//an object as property&lt;/p&gt;
&lt;p&gt;MYLIB.property2=new Prop2_constructor();&lt;/p&gt;
&lt;p&gt;//function&lt;/p&gt;
&lt;p&gt;MYLIB.a_function1 = function(arg1, arg2){&lt;/p&gt;
&lt;p&gt;//...some code&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=71693" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#70769</link><pubDate>Sat, 12 Jan 2013 23:38:38 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70769</guid><dc:creator>sergiopereira</dc:creator><description>&lt;p&gt;@Cedik, the construct you are asking about is commonly called &amp;quot;self-invoking anonymous function&amp;quot;. It&amp;#39;s basically a cuntion declaration that gets called right after it&amp;#39;s declared (the parenthesis at the end are calling the function). The function need to be wrapped in parenthesis because some browsers don&amp;#39;t like if do simply: &amp;nbsp;function(){ /* something */ }(); &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70769" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, time to grok closures</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/23/javascript-time-to-grok-closures.aspx#70768</link><pubDate>Sat, 12 Jan 2013 23:24:23 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70768</guid><dc:creator>sergiopereira</dc:creator><description>&lt;p&gt;@kumar, the btn var does end the process with a reference to the last button, that&amp;#39;s not a problem here. The problem is the value of &amp;quot;i&amp;quot;, it also contains the last value form the loop, and a reference to &amp;quot;i&amp;quot; is kept inside the event handler function and displayed in the alert message when that function gets invoked.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70768" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, time to grok closures</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/23/javascript-time-to-grok-closures.aspx#70602</link><pubDate>Wed, 12 Dec 2012 17:55:28 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70602</guid><dc:creator>kumar</dc:creator><description>&lt;p&gt;did not understand why do not the var btn refer to the last button object. why are multiple btn variables getting created?? i thought the btn would refer to the last button object!! &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70602" width="1" height="1"&gt;</description></item><item><title>re: Rule "Previous releases of Microsoft Visual Studio 2008" failed</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2010/03/07/rule-quot-previous-releases-of-microsoft-visual-studio-2008-quot-failed.aspx#70464</link><pubDate>Mon, 12 Nov 2012 05:32:47 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70464</guid><dc:creator>buzz</dc:creator><description>&lt;p&gt;hey guys, my system doesn&amp;#39;t seem to have this: &lt;/p&gt;
&lt;p&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\VS\Servicing\9.0\VSTS\1033&lt;/p&gt;
&lt;p&gt;but it has&lt;/p&gt;
&lt;p&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\VS\Servicing\10.0\expbsln\1033 with SP, SPINDEX AND SPNAME as 0x000000,0x000000 and RTM respectively.&lt;/p&gt;
&lt;p&gt;please what do i do?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70464" width="1" height="1"&gt;</description></item><item><title>re: ASP.NET MVC with jQuery SuperLoad</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/08/23/asp-net-mvc-with-jquery-superload.aspx#70437</link><pubDate>Fri, 02 Nov 2012 01:00:55 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70437</guid><dc:creator>Nimmi</dc:creator><description>&lt;p&gt;I followed steps given in the blog post here and no theme is apilepd just like that. I guess you missed to talk about JQuery binding like below, because my page works after adding below binding on document ready event in a JS file $(function() {$( &amp;nbsp;input:submit, a, button , &amp;nbsp;.demo &amp;nbsp;).button();$( &amp;nbsp;a , &amp;nbsp;.demo &amp;nbsp;).click(function() { return false; });});I may be wrong, however prefer to get it clarified by you once. Thanks!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70437" width="1" height="1"&gt;</description></item><item><title>re: Android App From Idea to Market In a Few Hours</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2010/12/06/android-app-from-idea-to-market-in-a-few-hours.aspx#70436</link><pubDate>Fri, 02 Nov 2012 00:47:16 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70436</guid><dc:creator>Santi</dc:creator><description>&lt;p&gt;Congratulations! &amp;nbsp; Just FYI, I noticed that (at the time of this wtiirng) there&amp;#39;s a typo &amp;nbsp; &amp;nbsp; Andorid &amp;nbsp;instead of Android.Just trying to be helpful &amp;nbsp; not a complaint.Donald Griggs, Columbia SC, USA&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70436" width="1" height="1"&gt;</description></item><item><title>re: JavaScript, 5 ways to call a function</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2009/02/09/javascript-5-ways-to-call-a-function.aspx#70374</link><pubDate>Sat, 13 Oct 2012 11:36:11 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70374</guid><dc:creator>JavaScript Training</dc:creator><description>&lt;p&gt;Fantastic Tutorial. Very informative on hidden concept.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70374" width="1" height="1"&gt;</description></item><item><title>re: jQuery Custom Element and Global Events</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2010/02/21/jquery-custom-element-and-global-events.aspx#70367</link><pubDate>Tue, 09 Oct 2012 09:56:01 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70367</guid><dc:creator>Emil</dc:creator><description>&lt;p&gt;Thanks you for this blog post . Helped me in desperate times .&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70367" width="1" height="1"&gt;</description></item><item><title>re: Oh, no. My TortoiseSVN overlays are missing</title><link>http://devlicious.com/blogs/sergio_pereira/archive/2010/01/05/oh-no-my-tortoisesvn-overlays-are-missing.aspx#70361</link><pubDate>Wed, 03 Oct 2012 17:49:38 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:70361</guid><dc:creator>Allison</dc:creator><description>&lt;p&gt;This worked wonderfully. I had to search where my reqistry was on my computer though. I did a restart after renaming the files and the icons came back!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicious.com/aggbug.aspx?PostID=70361" width="1" height="1"&gt;</description></item></channel></rss>