View Full Version : How do you add functions to a class?

9 Oct 2014, 7:02 AM
I would like to add some functions to Ext.form.field.Base without doing an override. This class already has two mixins: Ext.form.field.Field and Ext.form.Labelable. I would like to add an additional mixin to Ext.form.field.Base so all my form fields inherit the new functions I want to add. Currently, I am overriding Ext.form.field.Base and adding the new functions in the override class. I don't think this is the right way to do it because I will probably get burned when I upgrade to a newer Ext version.

9 Oct 2014, 10:55 AM
How about this? You'll have to be careful for sure, but it's an option.