title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
Wednesday, February 01, 2012 | |
Finally bothered to figure out what call() does, precisely, and why it needs 'this' passed in as an "extra" parameter. Great explanation here, in odetocode.com: var x = 10; So the deal is that "this" becomes the "new" "this" within the function, making it approximate a real object oriented overload. So if you're, say, extending some ExtJS objects in ExtJS 2, this is how you'd call the superclass' functions from the class' extension. So in Sencha's tutorial, you're first, very smartly, making a trivial extension of an existing object with code like this... initComponent:function() { So initComponent will do the same that it's always done, but will pull in the extended (though, for now, only trivially extended with no new functionality) object's methods, props, etc. when "this" is called. The whole Javascript revolution still seems like a giant kludge, but that obviously doesn't make it evil. It's a good hack, but takes a little head rethreading. Labels: ExtJS, javascript, problem solved posted by ruffin at 2/01/2012 10:03:00 AM |
|
| |
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
![]() |
|
|