HighDots Forums  

Re: Weird ExtJS 2.0 Code

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Weird ExtJS 2.0 Code in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Weird ExtJS 2.0 Code - 08-15-2008 , 01:48 PM






ajaxexample (AT) gmail (DOT) com wrote:
Quote:
On Aug 14, 11:33 am, "Aaron Gray" <ang.use... (AT) gmail (DOT) com> wrote:
What the hell is going on in source/adapter/ext-base.js on lines 36 and
45, Ext.lib.Dom.getViewportHeight and Width ?

It seems to be using 'self' which seems to come from no where ? [...]
Please trim your quotes to the parts that you are referring to.

Quote:
That use of self looks incorrect!
It is certainly unwise, but not incorrect.

Quote:
Usually people do `var self = this;` and I found that other places in the
code, but in ext-base.js it looks like it's being used without getting
set. Does that throw an error?
It would throw a ReferenceError exception if there was no object in the
scope chain to have such a property. After all, the `self' property of
Window objects (which would refer to its owner), and Window objects
themselves, are proprietary and host-dependent features.

Quote:
Ajax Example ::: [URI]
Don't.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.