The content assistent can't work

Bug Reports and Fixes
Post Reply
flywxly
Posts: 14
Joined: Sat Jan 26, 2008 3:48 am

The content assistent can't work

Post by flywxly » Sun Aug 24, 2008 5:05 am

The red color code content assistent can't work when many 'Ext.extend' in a file!
The spket version is 1.6.15.
Thank you very much.

Example code:

//@include "/netmis/common/js/include.js"
Ext.namespace("KSS", "KSS.control");

KSS.control.Control = function(config) {
Ext.apply(this, config);
}

KSS.control.TestControl = function(config) {
this.superclass = KSS.control.TestControl.superclass;
this.superclass.constructor.call(this, config);
}
Ext.extend(KSS.control.TestControl, KSS.control.Control, {
type : 'TestControl',
component : null,
testAttrib1 : 'test',
ttttsss : '',
title : '',

create : function() {
this.component = new Ext.Panel({
bodyStyle : 'background:transparent;',
html : 'ddd',
border : true
});
},

getProperty : function() {// int,float,string,enum,dialog
var c = {
tab : 'sss',
group : 'ssdd'
}
},

setTitle : function(value) {
this.title = value;
this.component.setTitle(value);
this.testAttrib1;
},
setPropFDlg : function(obj) {
Ext.MessageBox.show({
title : 'Address',
msg : 'Please enter your address:',
width : 300,
buttons : Ext.MessageBox.OKCANCEL,
multiline : true,
value : obj.getValue(),
fn : showResultText
});
function showResultText(btn, text) {
obj.setValue(text);
}
},
setPropA : function(value) {
this.propA = value;
},
setPropF : function(value) {
this.propF = value;
},
setPropK : function(value) {
this.propK = value;

},
saveControl : function() {
return {
type : this.type,
id : this.id,
name : this.name,
title : this.title
};
},
loadControl : function(cfg) {
this.component = new Ext.Panel({
title : 'test',
collapsible : true,
margins : '0 0 0 0',
cmargins : '0 0 0 0',
autoScroll : false,
html : 'test',
border : true
});
this.setTitle(cfg.title);
}
});

// KSS.control.KssTextField
KSS.control.KssTextField = function(config) {
this.superclass = KSS.control.KssTextField.superclass;
this.superclass.constructor.call(this, config);
}
Ext.extend(KSS.control.KssTextField, KSS.base.FormControl, {
type : 'KssTextField',
/**
* @type Ext.form.TextField
*/
component : null,
value : '',
width : 200,
height : 25,
ds : '',
allowBlank : true,
style : 'z-index:2',
inputType : 'text',
create : function() {
this.component = new Ext.form.TextField({
vtype : this.vtype,
value : this.value
});

},

onBlur : function() {
KSS.tools.execFunction(this.onBlurCode, this, arguments);
this.inputType
this.setHeight

},

getProperty : function() {
var pFormProperty = [];
pFormProperty = KSS.control.KssTextField.superclass.getProperty.call(this);
return pFormProperty;
},

setValue : function(v) {
this.value = v;
this.component.setValue(v);
},

setWidth : function(value) {
this.width = value;
this.component.setSize(value, this.height);
},

setHeight : function(value) {
this.height = value;
this.component.setSize(this.width, value);
},

loadControl : function(cfg) {
if (cfg.width)
this.width = cfg.width;

if (KSS.designer) {
this.component.setPosition(cfg.position[0], cfg.position[1]);
} else {
this.component.setPosition(cfg.position[0], cfg.position[1]);
}
}
});

// KSS.control.KssNumberField
KSS.control.KssNumberField = function(config) {
this.superclass = KSS.control.KssNumberField.superclass;
this.superclass.constructor.call(this, config);
}
Ext.extend(KSS.control.KssNumberField, KSS.base.FormControl, {
type : 'KssNumberField',
/**
* @type Ext.form.NumberField
*/
component : null,
value : '',
testabbr : '',


create : function() {
this.component = new Ext.form.NumberField({
minValue : this.minValue,
value : this.value
});

this.component.on('blur', this.onBlur, this);
},

getProperty : function() {
var pFormProperty = [];
pFormProperty = KSS.control.KssNumberField.superclass.getProperty.call(this);
return pFormProperty;
},

setValue : function(v) {
this.value = v;
this.component.setValue(v);
},

getValue : function(v) {
return this.component.getValue();
},

loadControl : function(cfg) {

}
});

eric_suen
Site Admin
Posts: 678
Joined: Wed Sep 28, 2005 7:00 am
Contact:

Post by eric_suen » Mon Aug 25, 2008 6:38 am

Thanks for report this bug, it has been fixed in version 1.6.15.1, please update to the new version.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest