PDA

View Full Version : Trying to call a pre-configured class, errors out



abcdef
19 May 2010, 6:32 PM
Hello,

I am trying to call a pre-configured class (as per Saki's guidance) and I get the following error in Safari:

TypeError: Result of expression 'this.addEvents' [undefined] is not a function.

This happens at ext-all-debug-w-comments.js - line no. 14986

Any ideas at all? Here is the code:

Extension:


Test.shell = Ext.extend(Ext.Viewport, {
id: 'Viewport',
initComponent:function() {
var config = {
};
Ext.apply(this, config);
MyApps.superclass.initComponent.apply(this, arguments);
},
onRender:function() {
MyApps.superclass.onRender.apply(this, arguments);
}
});

Ext.reg('shell', Test.shell);

Main:


Ext.BLANK_IMAGE_URL = '../ext/resources/images/default/s.gif';
Ext.ns('Test');
Ext.onReady(function() {
Test.shell();
});

Thank you in advance.

evant
19 May 2010, 6:37 PM
Test.shell is a class. Say you were writing C#:



public class Foo{

public Foo(){
//constructor stuff
}

}

Foo(); // It doesn't work?!?!

abcdef
19 May 2010, 7:22 PM
wow i am sorry...i was trying to set up a test page and i messed up the names with another implementation..should've checked more thoroughly before posting..i apologize..