ExtJSv7: Error while implementing Ext.mixin.Observable - extjs

We are trying to implement Ext.mixin.Observable in our ViewController, snippet below
mixins: ['Ext.mixin.Observable'],
constructor: function(config){
this.mixins.observable.constructor.call(this, config);
},
but this raises an error for this.mixins.observable.constructor.call(this, config); in Viewcontroller
BaseController.js?_dc=1587282588103:440 Uncaught TypeError: Cannot read property 'listen' of undefined
at constructor.listen (BaseController.js?_dc=1587282588103:440)
at constructor.callParent (Base.js?_dc=1587282588090:1479)
at constructor.listen (ViewController.js?_dc=1587282588091:206)
at constructor.updateListen (BaseController.js?_dc=1587282588103:257)
at constructor.setter [as setListen] (Config.js?_dc=1587282588102:329)
at Ext.Configurator.configure (Configurator.js?_dc=1587282588102:674)
at constructor.initConfig (Base.js?_dc=1587282588090:1650)
at constructor (Observable.js?_dc=1587282588091:437)
at constructor (MainController.js?_dc=1587282588090:6)
what could be wrong here, I followed the documentation given on sencha docs for Ext.mixin.Observable

Look like you miss this.callParent(arguments) in constructor after call observable constructor

Related

Error: Uncaught (in promise): TypeError: PlotlyService_1._plotly.purge is not a function

On leaving the angular component which uses the Plotly library, gives this error.
Probably an error while destroying the component and Plotly trying to access the purge function
ERROR Error: Uncaught (in promise): TypeError: PlotlyService_1._plotly.purge is not a function
TypeError: PlotlyService_1._plotly.purge is not a function
at Function.remove (http://localhost:4200/vendor.js:191063:37)
at PlotComponent.ngOnDestroy (http://localhost:4200/vendor.js:191206:23)
at callProviderLifecycles (http://localhost:4200/vendor.js:88385:18)
at callElementProvidersLifecycles (http://localhost:4200/vendor.js:88344:13)
at callLifecycleHooksChildrenFirst (http://localhost:4200/vendor.js:88326:29)
at destroyView (http://localhost:4200/vendor.js:98754:5)
at callViewAction (http://localhost:4200/vendor.js:98913:13)
at execComponentViewsAction (http://localhost:4200/vendor.js:98821:13)
at destroyView (http://localhost:4200/vendor.js:98753:5)
I have tried many ways for this issue but finally found the reason.
The plotly-plot was used in 2 modules. The import was done via plotlyViaCDNModule, which was causing the issue.
Use this instead:
import { PlotlyModule } from 'angular-plotly.js';
import * as PlotlyJS from 'plotly.js/dist/plotly.js';
PlotlyModule.plotlyjs = PlotlyJS;
imports: [ ....
PlotlyModule,
]

Uncaught TypeError: sweetalert2_react_content_1.default is not a function

I have a react module where i am using TypeScript.
I want to use html within a Swal-component, and that just doesn't work.
Here is my code:
import Swal from "sweetalert2";
import withReactContent from "sweetalert2-react-content";
const MySwal = withReactContent(Swal);
MySwal.fire(<p>Holahola</p>);
When i hover the "Holahola" i get the error message: "Type 'Element' has no properties in common with type 'SweetAlertOptions'.ts(2769)".
When i try to run my code in Chrome, i get: "Uncaught TypeError: sweetalert2_react_content_1.default is not a function"
Someone got a clue what happens here?
I have also tried:
MySwal.fire({
title: <p>Holahola</p>
})
Then i get this error:
That's the known issue, you can subscribe to it here: https://github.com/sweetalert2/sweetalert2-react-content/issues/102
As a workaround, use SweetAlertOptions for passing the params:
MySwal.fire({
title: <p>Holahola</p>
});

Unhandled Rejection (TypeError): Failed to construct 'AudioWorkletNode' [ReactJS]

class InputWorkletNode extends window.AudioWorkletNode {
constructor(context) {
super(context, 'input-processor');
}
get recBuffers() {
return ['test', 'test!'];
}
}
When the code is put into my reactjs project (initiated with create-react-app), it's giving me the following error:
Unhandled Rejection (TypeError): Failed to construct
'AudioWorkletNode': Please use the 'new' operator, this DOM object
constructor cannot be called as a function.
Has anyone had the same issue before? Any help would be appreciated.
Solved by putting the code into public folder and change it to
window.InputWorkletNode = class InputWorkletNode extends window.AudioWorkletNode {
constructor(context) {
super(context, 'input-processor');
} get recBuffers() {
return ['test', 'test!'];
}
}
One option that had success for me was to change from es5 to es6.
"target": "es6"
in tsconfig.json

jest test failing in component whilst setting the domain

TypeError: Cannot set property domain of [object Object] which has only a getter
Occurring in this function:
componentWillMount(){
document.domain="moc.com";
CreditStore.addChangeListener(() => this._getModalErrorList());
}
Why?

"renderTo" breaks the execution

I want to render a toolbar on top of page when the application initiates.
Running the following in viewport.js works when ext-all-dev.js is included in the page. but when I use ext-dev.js instead, it throw the exception.Uncaught TypeError: undefined is not a function
Ext.create("Ext.toolbar.Toolbar", {
renderTo: document.body,
defaultType: 'button',
items: [{text: 'foo'}]
});
What is wrong with it? Also running above code in console works with both ext-dev.js and ext-all-dev.js files. The exception stack is:
Uncaught TypeError: undefined is not a function AbstractComponent.js?_dc=1398852700374:170
Ext.define.statics.updateLayout AbstractComponent.js?_dc=1398852700374:170
Ext.define.updateLayout AbstractComponent.js?_dc=1398852700374:3319
Ext.define.afterRender Renderable.js?_dc=1398852701043:195
Base.implement.callParent ext-debug.js:4266
Ext.define.afterRender Component.js?_dc=1398852699982:435
Ext.define.finishRender Renderable.js?_dc=1398852701043:458
Ext.define.render Renderable.js?_dc=1398852701043:784
Ext.define.constructor AbstractComponent.js?_dc=1398852700374:1231
Base.implement.callParent ext-debug.js:4266
Ext.define.constructor Component.js?_dc=1398852699982:377
constructor ext-debug.js:4897
(anonymous function) VM11066:3
Ext.ClassManager.instantiate ext-debug.js:5485
(anonymous function) ext-debug.js:2112
(anonymous function) Viewport.js?_dc=1398852703350:51

Resources