PDA

View Full Version : [FIXED] Ext.Button.initialize does not invoke initialize on its base class



r_honey
19 Nov 2011, 7:39 AM
Here's the initialize method from Ext.Button:




initialize: function() { this.element.on({ scope : this, tap : 'onTap', touchstart : 'onPress', touchmove : 'onRelease', touchend : 'onRelease' }); },

Shouldn't it invoke initialize on its base class too so any extensions put on Ext.Component.initialize by "sequencing" it cascade down the the humble button class too.

mitchellsimoens
19 Nov 2011, 12:44 PM
Thank you for the report.

r_honey
19 Nov 2011, 9:25 PM
I believe initialize is an empty function in the base class by default (haven't checked it), so it works...

mitchellsimoens
19 Nov 2011, 9:31 PM
I believe initialize is an empty function in the base class by default (haven't checked it), so it works...

It is an empty function but what if you changed something in one of the superclasses, this wouldn't call it.

r_honey
20 Nov 2011, 2:13 AM
And that's exactly why I have filed this bug report. I have sequenced initialize method for Component for providing additional features but it did not work with Button and I had to sequence Button's initialize again.

Jamie Avins
21 Nov 2011, 9:35 AM
This has been fixed for the next release.

r_honey
21 Nov 2011, 1:01 PM
Thanks.. When can we expect it ;)