Ext.application({
name: 'example',
launch: function() {
var panel = Ext.create('Ext.panel.Panel', {
id:'myPanel',
renderTo: Ext.getBody(),
width: 400,
height: 200,
title: 'Example Panel'
});
//issue here
panel.update();
I encountered an error displayed in the console:
Uncaught TypeError: Object [object Object] has no method 'update'
When inspected through a debugger, I noticed that the variable 'panel' is of type 'constructor.'
panel:constructor
This explains why the 'update' method is not available. It seems odd to me that I am referencing a constructor function instead of a newly created object.
The same situation arises when creating other objects from ExtJs core classes.
Is this possibly related to my project's structure?
P.S. My knowledge of JavaScript is limited, so it is possible that the issue lies in my understanding of fundamental concepts.