Ext JS Screencast #003 – Ext.apply explained

May 26th, 2008 Jay Garcia Posted in EXT Examples, EXTJS, ScreenCasts | 6 Comments »

6 Responses to “Ext JS Screencast #003 – Ext.apply explained”

  1. The sketchcasting is coming along well. (I must admit to some initial skeptiscism.)

    Thanks for explaining Ext.Apply so clearly. (shame about Firebug error :-) )

  2. Thank you for the comments :) . I am hoping to get one done for Ext.each soon. I’m being hit hard by the youTube 10 minute limit. :(

    I’m thinking of hosting my own videos, that will have better quality, so the text will be easier to read. thoughts?

  3. Hi Jay,

    Thanks for putting these together, though this one did confuse me a little. I was writing a comment but it became far too long so I turned it into a blog post instead at http://edspencer.net/2008/08/how-extapply-works-and-how-to-avoid-big.html.

    The gist is I think Ext.apply doesn’t quite work the way your screencast makes it appear to, due to your obj2 and obj3 being references to the same object. I think I’ve got the reasoning right on my post but couldn’t give a good reason why it was behaving the way it does – perhaps you have some idea about that?

    Anyway thanks for making these screencasts, and yes, a higher quality version would be great!

  4. Hi Ed,

    Thank you very much for your feedback. You’re absolutely correct that I should have pointed out the fact that the first parameter will always receive the parameters. I think diving into the source of ‘/source/core/Ext.js’ would explain how it works.

    Part of the reason I assign obj3 to the result of the merge of obj2 and obj1 is because many examples do this, even though, as you pointed out, the obj2 reference is the exact same obj3. Below is reformatted code for Ext.apply.

    Keep up the great work :) .

  5. For anyone following this thread, there is a very intelligent conversation regarding t his exact same subject in the Ext forums. http://extjs.com/forum/showthread.php?t=45430

  6. [...] know how it works inside, but while watching an otherwise excellent screencast from Jay Garcia (see http://tdg-i.com/42/ext-js-screencast-003-extapply-published), something odd happened. The example he gave went like this (commented lines signify the output [...]

Leave a Reply

You must be logged in to post a comment.