0

I have this particular code snippet in a JS file:

var fileView = Ext.create('My.ext.File.Panel', {
            style: 'border:none;',
            loadMask: {
                msg: 'Please wait ...'
        ...

And when i search i can see that My.ext.File.Panel appears in the requires config of various custom components.

But i am not able to find Ext.define('My.ext.File.Panel' anywhere in the source.

Can anybody shed some light or point me to how i can find out the source for this custom panel - My.ext.File.Panel. I have tried debugging with dev-tools in chrome and firefox but could not get it, not sure where to look.

Thank You

Prakash K
  • 11,669
  • 6
  • 51
  • 109

1 Answers1

1

There are some ways to create a class in ExtJs or to assign an alias. Perhaps the class name is assembled using variables.

The Ext.ClassManager has a debug function, which can record any registration of a class. Insert the code example below before you start your application. This should help you to get to the code that defines the class.

Ext.classSystemMonitor = function(className){
  if(className === 'My.ext.File.Panel')
  {
      console.log(className, arguments);
  }
};
Artem Stepin
  • 421
  • 5
  • 13
  • Thanks. Will try and update. `Perhaps the class name is assembled using variables.` hmmm ... that might be the case. – Prakash K Jun 14 '17 at 08:35
  • I am not sure how can i use this. Can you please help? – Prakash K Jun 14 '17 at 09:13
  • 1
    I use the following: 1) in addition to console.log I add a `debugger;` statement 2) insert the codeblock into my `app.js` file before the application is defined with` Ext.application`. 3) If the debugger (Chrome Dev Tools should be open) stops in place, I look in the call stack from where the calls came. There you should find a file which is not in the ExtJs core.Here an example: https://fiddle.sencha.com/#view/editor&fiddle/21fl – Artem Stepin Jun 14 '17 at 09:27