PDA

View Full Version : itemclick event handler parameters - where are they implemented in the source?



mx_starter
23 Apr 2014, 6:41 AM
Hi guys,
as you know, the Ext.panel.Table class has many mouse events implemented - like:
itemclick, itemdblclick, itemcontextmenu and so on..

All of these events handlers are receiving the same parameters defined like this:
itemmousedown (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.panel.Table-event-itemmousedown)( this, record, item, index, e, eOpts )

Can you please assist me with the following:

I need to know where in the Ext source code files these handler parameters are implemented so the handler function can use them?

Specifically - i need to know where the 'record' parameter is coming from in the source code.

Why i need this is a very bad bug in 4.2.1, which i described (and demonstrated with a fiddle) here:
http://www.sencha.com/forum/showthread.php?283189

Unfortunately, i received no help there so decided to try here too.

Thanks in advance.

Bleak
23 Apr 2014, 8:50 AM
Based on looking at the Ext source, it appears to be fired from Ext.view.View.

Specifically in the processUIEvent method

mx_starter
24 Apr 2014, 4:10 AM
Based on looking at the Ext source, it appears to be fired from Ext.view.View.

Specifically in the processUIEvent method

Thanks, Bleak.
Although not entirely solved my problem, you directed me to the correct start point.

As i said - i was looking where the "record" argument is coming from.
Within the processUIEvent() method, there is a call like this:


record = me.getRecord(item);

So this led me to the getRecord() method of the Ext.view.Table.

Finally, i managed to overcome my problem with a little modification in this method.

Thanks for the kind assistance, cheers :)