-
1 Sep 2010 2:57 AM #1
How to define and instantiate a new class
How to define and instantiate a new class
Hi all,
I'm new to ExtJS and I would like to know how to create a new class.
I'm used to Prototype, where I used to write something like:
/* DEFINITION */
Test = {};
Test.c = Class.create();
Test.c.prototype = {
initialize: function() {
...constructor...
},
...
...
};
/* INSTANTIATION */
var MyTest = new Test.c();
Is it possible to do something similar with ExtJS?
Thank you,
Luca
-
1 Sep 2010 3:00 AM #2
Have a look at the Ext source, it shows exactly how to create classes.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
1 Sep 2010 4:34 AM #3
-
1 Sep 2010 4:46 AM #4
No, one of the files where it creates a class, just have a look through a few of them.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Similar Threads
-
Dynamically instantiate a class
By bkraut in forum Ext 3.x: Help & DiscussionReplies: 7Last Post: 28 Sep 2009, 3:13 AM -
Why can't I define a view in a pre-configured class
By bernd01 in forum Ext 2.x: Help & DiscussionReplies: 11Last Post: 10 Mar 2009, 9:38 AM -
what class define html?
By hchen in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 30 Jun 2008, 7:42 AM -
Define class on ajax call
By marco76 in forum Ext 2.x: Help & DiscussionReplies: 11Last Post: 15 Jan 2008, 4:13 AM -
How to instantiate an object of the same class as "this"?
By mherger in forum Ext 1.x: Help & DiscussionReplies: 4Last Post: 24 May 2007, 12:05 PM


Reply With Quote
