dancha
4 Sep 2011, 6:13 AM
I understand event handling in javascript....I think. This is probably a super newbie question in extjs but.
in the doc I see a ton of 'events' for each component. Anyone have a really basic way to explain how I use those events or confirm if what I'm doing below is it? Feels like I'm missing something. Right now I'm implementing events by doing this:
Ext.getCmp('mySlider').on('change', function(slider, newValue, thumb, options )
{
//do stuff
}
because i see a documented event called change(slider, newValue, thumb, options ).
That's really it? Anyway to do that when I'm intitializing that slider? I see the listeners initializer but seems a little weird. Could use like a superbasic intro to this stuff so I know I'm doing it the preferred way.
in the doc I see a ton of 'events' for each component. Anyone have a really basic way to explain how I use those events or confirm if what I'm doing below is it? Feels like I'm missing something. Right now I'm implementing events by doing this:
Ext.getCmp('mySlider').on('change', function(slider, newValue, thumb, options )
{
//do stuff
}
because i see a documented event called change(slider, newValue, thumb, options ).
That's really it? Anyway to do that when I'm intitializing that slider? I see the listeners initializer but seems a little weird. Could use like a superbasic intro to this stuff so I know I'm doing it the preferred way.