Why does extJS give me "Ext.Panel is not a constructor" error in Firebug?
I am working through this extJS tutorial where you type in code into Firebug, press CTRL-Enter and it renders it for you, it worked f开发者_如何学编程or the simple example but then I got this error:
Instructions:
What happens:
What else do I need to do to get this example to work as it states it will in the demo?
You need to have ext-all.js
(and maybe ext-base.js
?) loaded in the page you're testing for this to work. The example isn't working properly for you because the Panel file cannot be located. It doesn't exist because you haven't added it.
Test the Ext.Panel code in firebug at the API site: http://dev.sencha.com/deploy/dev/docs/
You'll see that the desired behavior occurs because the page has all of the proper JS files loaded. Any time you see the message "... is not a constructor" should be an indication that the JS file containing the object has not been loaded into the page.
精彩评论