Wednesday, April 16, 2008

Manual:Intro:Class Design cn - Learn About the Ext JavaScript Library

Manual:Intro:Class Design cn - Learn About the Ext JavaScript Library: "你必须使用prototype对象:

// 我们定义了一个prototype对象的一个方法
myClass.prototype.sharedMethod = function() { alert('I'm a shared method') }

// 显示我们的信息
A.sharedMethod();

// 相同的信息
B.sharedMethod();

There is no method named sharedMethod in the myClass definition. Javascript looks for a method with this name in the prototype object of myClass and calls it if it exists. 在myClass定义中并没有一个名为sharedMethod的方法。Javascript会在myClass相关联的prototype对象中寻找与该方法名相同的方法,如果存在的话,Javascript则调用该方法。"

Manual:Intro:Class Design - Learn About the Ext JavaScript Library

Manual:Intro:Class Design - Learn About the Ext JavaScript Library: "// We define a method of the prototype object Ext.apply(myClass.prototype, { defaultClassName: 'x-widget-class', sharedMethod: function() { alert('I'm a shared method') } }); // Display our message A.sharedMethod(); // Same message B.sharedMethod();"

Monday, April 7, 2008

Ext JS Blog - » IDEs, plugins and tools for Ext JS 2.0

* Download and install Aptana Studio (includes Eclipse).
* Start Aptana and navigate the application menu to: Help → Software Updates → Find and Install… → Search for new features to install → New remote site…
* Name: “Spket”, Url: “http://www.spket.com/update/”
* Restart Aptana
* Watch this Spket IDE Tutorial to see how to easily add Ext code assist (you can point it at the latest /src/ext.jsb to keep code assist up to date with the latest Ext version). The steps are basically:
o Window → Preferences → Spket → JavaScript Profiles → New
o Enter “ExtJS” and click OK
o Select “ExtJS” and click “Add Library”, then choose “ExtJS” from the dropdown
o Select “ExtJS” and click “Add File”, then choose the “ext.jsb” file in your “./ext-2.x/source” directory
o Set the new ExtJS profile as the default by selecting it an clicking the “Default” button on the right-hand side of the “JavaScript Profiles” dialog.
o Restart Aptana
o Create a new JS file and type: Ext. and you should get the Ext Code completion options.

Sunday, April 6, 2008

Ext JS - JavaScript Library

Ext JS - JavaScript Library: "Finally it is possible to create sweet user- experiences for the web (cross-browser!!) without spending 2 months hating and fighting in javascript. This library has made me believe in web2.0 again.
— Steinar M."