Jan 14, 2020, 5:46 PM
SelectBox "script block" error
Hello,
I am encountering an error in the Visual Studio IDE in a "script block" that looks like it is generated by Ext.Net. I have no idea where it gets loaded as i cannot find any of the source on disk. The script block is shown below and is shown in a "script block" container in the Visual Studio IDE tree view in Solution Explorer. This code errors out at
variable available. I have also attached a screen shot for clarity. What is the best way around this error?
I am encountering an error in the Visual Studio IDE in a "script block" that looks like it is generated by Ext.Net. I have no idea where it gets loaded as i cannot find any of the source on disk. The script block is shown below and is shown in a "script block" container in the Visual Studio IDE tree view in Solution Explorer. This code errors out at
this.lastSelectedIndex = this.getStore().indexOf(records[0]) + 1;
as there is no
records
Ext.define('Ext.ux.SelectBox', {
extend: "Ext.form.field.ComboBox",
alias: "widget.selectbox",
constructor: function (config) {
this.searchResetDelay = 1000;
config = Ext.merge(config || {}, {
editable: false,
forceSelection: true,
rowHeight: false,
lastSearchTerm: "",
triggerAction: "all",
queryMode: "local",
listConfig: {
navigationModel: "boundlistselectbox",
listeners: {
refresh: {
fn: this.calcRowsPerPage,
scope: this,
delay: 100
},
afterRender: function () {
this.listEl.unselectable();
},
itemmouseenter: {
fn: function (view, record, node, index) {
this.lastSelectedIndex = index + 1;
this.cshTask.delay(this.searchResetDelay);
},
scope: this
}
}
}
});
this.callParent([config]);
this.lastSelectedIndex = this.selectedIndex || 0;
this.on("select", function (combo, records) {
this.lastSelectedIndex = this.getStore().indexOf(records[0]) + 1;
});
if (Ext.isChrome) {
this.on("expand", function () { this.focus(); }); // for some reason, it doesn't happen automatically in Chrome
}
}