[jQuery] Re: Pro Javascript Techniques Doubt

2008-12-18 Thread pablo fernandez
ed (like on page 153). No need to pass >> > the argument this way, moreover not that easy to mistype: >> >> > for ( var j in properties ) { (function(){ >> >var i=j; >> >... >> >> > I can't believe no one has spotted >> > this:ht

[jQuery] Re: Pro Javascript Techniques Doubt

2008-12-18 Thread pablo fernandez
le declared (like on page 153). No need to pass > the argument this way, moreover not that easy to mistype: > > for ( var j in properties ) { (function(){ >var i=j; >... > > I can't believe no one has spotted this: http://www.apress.com/book/errata/275 > > O

[jQuery] Re: Pro Javascript Techniques Doubt

2008-12-18 Thread Pablo Fernandez
at either design error or feature too :) > > On Dec 18, 4:18 pm, Pablo Fernandez > wrote: > > > another thing... why inside the anonymous function 'this' refers to > > 'window' ??  it's totally misleading...

[jQuery] Re: Pro Javascript Techniques Doubt

2008-12-18 Thread Pablo Fernandez
another thing... why inside the anonymous function 'this' refers to 'window' ?? it's totally misleading...

[jQuery] Re: Pro Javascript Techniques Doubt

2008-12-18 Thread Pablo Fernandez
thanks that seems to work, but the 'getname' method returns 44 instead of "Bob", and then 22... it appears that it's pointing to the age variable, any idea why? thank you!

[jQuery] Pro Javascript Techniques Doubt

2008-12-18 Thread Pablo Fernandez
Hi, I'm reading "Pro Javascript Techniques" from John Resig, and I'm confused with an example. This is the code: // Create a new user object that accepts an object of properties function User( properties ) { // Iterate through the properties of the object, and make sure // that it's properly