Modified:
trunk/CHANGELOG.txt
trunk/ExtJS2Parser/ExtJS2Parser/SourceConverter.cs
trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.debug.js
trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.js
Log:
* Fixed inheritance problem using Ext.extend()
- Changed the createClass function to call _createClass after Ext.extend
- Added additional logic to handle cases where
baseClass.prototype.ctype is not set on an Ext class (i.e. Ext.dd.DropTarget)
Modified: trunk/CHANGELOG.txt
==============================================================================
--- trunk/CHANGELOG.txt (original)
+++ trunk/CHANGELOG.txt Fri Mar 14 12:32:32 2008
@@ -1,3 +1,8 @@
+03/14/2008 - teflon
+* Fixed inheritance problem using Ext.extend()
+ - Changed the createClass function to call _createClass after Ext.extend
+ - Added additional logic to handle cases where
baseClass.prototype.ctype is not set on an Ext class (i.e. Ext.dd.DropTarget)
+
02/26/2008 - teflon
* Upgraded ExtSharp to use ExtJS 2.0.2
Modified: trunk/ExtJS2Parser/ExtJS2Parser/SourceConverter.cs
==============================================================================
--- trunk/ExtJS2Parser/ExtJS2Parser/SourceConverter.cs (original)
+++ trunk/ExtJS2Parser/ExtJS2Parser/SourceConverter.cs Fri Mar 14
12:32:32 2008
@@ -117,19 +117,19 @@
sb.AppendLine(" // if a base type is defined then use Ext.extend()");
sb.AppendLine(" if(b) {");
sb.AppendLine(" var ct=b.prototype.ctype;");
+ sb.AppendLine(" var sp = typeof b.superclass != 'undefined';");
sb.AppendLine(" // if the base type is an ExtJS class");
- sb.AppendLine(" if(ct && ct.substring(0,3)=='Ext') { ");
+ sb.AppendLine(" if(sp || (ct &&
ct.substring(0,3)=='Ext')) {");
sb.AppendLine(" // stop Script# from copying members");
sb.AppendLine(" delete this.__basePrototypePending;");
- sb.AppendLine(" // ugly, I know, but i don't
know any other ");
- sb.AppendLine(" // way to accoplish this");
+ sb.AppendLine(" // ugly, I know, but i don't
know any other way to accoplish this");
sb.AppendLine(" eval(n+' = Ext.extend(b, this.prototype);');");
+ sb.AppendLine(" this._createClass(n);");
sb.AppendLine(" return;");
sb.AppendLine(" }");
sb.AppendLine(" }");
sb.AppendLine(" this._createClass(n,b,i);");
sb.AppendLine("}");
-
//sb.AppendLine("Type.prototype._createClass=Type.prototype.createClass;Type.prototype.createClass=function(n,b,i){if(b){var
ct=b.prototype.ctype;if(ct&&ct.substring(0,3)=='Ext'){delete
this.__basePrototypePending;eval(n+' = Ext.extend(b, this.prototype);');return;}}this._createClass(n,b,i);}");
sb.AppendLine();
sb.AppendLine();
sb.AppendLine("// **** bug fixes ****");
Modified: trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.debug.js
==============================================================================
--- trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.debug.js (original)
+++ trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.debug.js Fri Mar 14
12:32:32 2008
@@ -34,13 +34,14 @@
// if a base type is defined then use Ext.extend()
if(b) {
var ct=b.prototype.ctype;
+ var sp = typeof b.superclass != 'undefined';
// if the base type is an ExtJS class
- if(ct && ct.substring(0,3)=='Ext') {
+ if(sp || (ct && ct.substring(0,3)=='Ext')) {
// stop Script# from copying members
delete this.__basePrototypePending;
- // ugly, I know, but i don't know any other
- // way to accoplish this
+ // ugly, I know, but i don't know any other way to
accoplish this
eval(n+' = Ext.extend(b, this.prototype);');
+ this._createClass(n);
return;
}
}
Modified: trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.js
==============================================================================
--- trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.js (original)
+++ trunk/ExtJS2Parser/ExtSharp/ExtSharpAdapter.js Fri Mar 14 12:32:32 2008
@@ -1,4 +1,4 @@
-ExtClass=Ext;Ext.UpdaterClass=Ext.Updater;Ext.SplitBarClass=Ext.SplitBar;Ext.ToolbarClass=Ext.Toolbar;Ext.WindowClass=Ext.Window;Ext.form.ActionClass=Ext.form.Action;Ext.layout.BorderLayoutClass=Ext.layout.BorderLayout;Ext.DomQuery.is_=Ext.DomQuery.is;Ext.Element.is_=Ext.Element.is;Ext.override_=Ext.override;Ext.namespace_=Ext.namespace;Ext.dd.DragDrop.lock_=Ext.dd.DragDrop.lock;Ext.dd.DragDropMgr.lock_=Ext.dd.DragDropMgr.lock;Ext.grid.AbstractSelectionModel.lock_=Ext.grid.AbstractSelectionModel.lock;Ext.form.Action.params_=Ext.form.Action.params;Ext.form.Checkbox.checked_=Ext.form.Checkbox.checked;Ext.grid.ColumnModel.fixed_=Ext.grid.ColumnModel.fixed;Ext.menu.CheckItem.checked_=Ext.menu.CheckItem.checked;Type.prototype._createClass=Type.prototype.createClass;Type.prototype.createClass=function(n,b,i){if(b){var
ct=b.prototype.ctype;if(ct&&ct.substring(0,3)=='Ext'){delete
this.__basePrototypePending;eval(n+' = Ext.extend(b, this.prototype);');return;}}
+ExtClass=Ext;Ext.UpdaterClass=Ext.Updater;Ext.SplitBarClass=Ext.SplitBar;Ext.ToolbarClass=Ext.Toolbar;Ext.WindowClass=Ext.Window;Ext.form.ActionClass=Ext.form.Action;Ext.layout.BorderLayoutClass=Ext.layout.BorderLayout;Ext.DomQuery.is_=Ext.DomQuery.is;Ext.Element.is_=Ext.Element.is;Ext.override_=Ext.override;Ext.namespace_=Ext.namespace;Ext.dd.DragDrop.lock_=Ext.dd.DragDrop.lock;Ext.dd.DragDropMgr.lock_=Ext.dd.DragDropMgr.lock;Ext.grid.AbstractSelectionModel.lock_=Ext.grid.AbstractSelectionModel.lock;Ext.form.Action.params_=Ext.form.Action.params;Ext.form.Checkbox.checked_=Ext.form.Checkbox.checked;Ext.grid.ColumnModel.fixed_=Ext.grid.ColumnModel.fixed;Ext.menu.CheckItem.checked_=Ext.menu.CheckItem.checked;Type.prototype._createClass=Type.prototype.createClass;Type.prototype.createClass=function(n,b,i){if(b){var
ct=b.prototype.ctype;var sp=typeof b.superclass!='undefined';if(sp||
(ct&&ct.substring(0,3)=='Ext')){delete
this.__basePrototypePending;eval(n+' = Ext.extend(b, this.prototype);');this._createClass(n);return;}}
this._createClass(n,b,i);}
String.prototype.replace=String.prototype._replace;