Should be noted that here Jay presents 'the old way' Ext.extend method, commonly used in Ext 1.x; starting with Ext 2.x there is also a new approach of using Ext.extend without the need to explicitly define the SubClass constructor(e.g the var b = function (){}; part).
YouTube won't let me post the JavaScript example. But just create a function, A. Add a method X to its prototype that alerts "Hi" to the user. Create a function B. Instantiate an instance of A as Test1. Use Ext to extend the A class with the superclass B (nothing new added). Now instantiate another instance of A as Test2.
Yeah, but pretty worthless. The Ext.extend method claims to extend an existing CLASS, but ends up blowing away any prototype already defined for it. I have an example, but I'll have to paste this in separate comments because even though YouTube says I had 6 characters left, when I tried to post the whole comment it says I have too many characters (sigh).
Should be noted that here Jay presents 'the old way' Ext.extend method, commonly used in Ext 1.x; starting with Ext 2.x there is also a new approach of using Ext.extend without the need to explicitly define the SubClass constructor(e.g the var b = function (){}; part).
lylytyger 3 months ago
Thanks very much, I just went to extend my first Ext class and your tutorial helped a lot to understand what is required. :)
lukemoynihan 2 years ago
YouTube won't let me post the JavaScript.
Arythmael 2 years ago
YouTube won't let me post the JavaScript example. But just create a function, A. Add a method X to its prototype that alerts "Hi" to the user. Create a function B. Instantiate an instance of A as Test1. Use Ext to extend the A class with the superclass B (nothing new added). Now instantiate another instance of A as Test2.
Call the X method on Test1 (you see the alert).
Call the X method on Test2.
Arythmael 2 years ago
Yeah, but pretty worthless. The Ext.extend method claims to extend an existing CLASS, but ends up blowing away any prototype already defined for it. I have an example, but I'll have to paste this in separate comments because even though YouTube says I had 6 characters left, when I tried to post the whole comment it says I have too many characters (sigh).
Arythmael 2 years ago
Please keep this coming. I am a subscriber now. I learn so much than reading the online docs on extjs's website.
ucrstevetaebo 3 years ago
Thanks muchly, this was a helpful video. For some reason it all clicked into place.
beachhunt 3 years ago 4
Thanks dude.
tdginnovations 2 years ago
Hey dude! it's great. just keep going.
thanks.
khashayar581 3 years ago 3