Can't display an alert using MessageBox in Sencha Touch 2 - sencha-touch

In a handler in one of my controllers, I'm running into issues displaying a simple alert message. Using Sencha Touch 2.4.1
Ext.Msg.alert('Status', 'test');
--> "Uncaught TypeError: Cannot read property 'alert' of undefined"
As per these instructions, I added the following require statement: Ext.window.MessageBox to my controller.
--> Failed to find any files for /PATH/FILE.js::ClassRequire::Ext.window.MessageBox
Replaced Msg with MessageBox and removed require statement.
Ext.MessageBox.alert('Status', 'test')
--> "Uncaught TypeError: undefined is not a function"
Ran into the same problem when using .confirm.
Here's the docs - looks like it should work.
Anybody know why it doesn't?

I needed to require Ext.MessageBox instead of Ext.window.MessageBox and had to use Ext.Msg.alert... instead of Ext.MessageBox.alert... though I'm not totally clear on why.
Saw this in the docs: "The framework provides a global singleton Ext.Msg for common usage which you should use in most cases."

Related

Vue: Showing that the function does not exist when I have defined it the relevant store

I am currently working on a simple app to store workout routines in Nuxt 3 and Appwrite. The link to the source code is here.
After logging in and adding in some workouts in the app's UI, whenever I try to call the deleteWorkout function, I get an error in the console saying that the function is not defined, whereas I have clearly defined in the workoutStore. I can't seem to figure out the reason for the same.
The same can be seen in the given screenshot.
Console on clicking the delete button
PS:
Most probably the error should be originating from either /pages/workouts.vue, /components/WorkoutDetails.vue or /stores/workout.js.
I am using Appwrite to manage the back-end of the web app, and the instructions to setup the same can be found in the README.md. (Though I don't think the error I am facing is related to the same.)
In your code the problem is, you declear your deleteWorkout() function outside of the actions block in workout.js file.
Make sure all your functions in the workout store are inside the actions block. Then it will be accessable from the vue component

Persistent React-Native error that goes away with Remote Debugging enabled

I'm building a React-Native app and whenever I run it on my Android emulator, I get this error:
Objects are not valid as a React child (found: object with keys
{$$typeof, type, key, ref, props, _owner, _store}). If you meant to
render a collection of children, use an array instead.
throwOnInvalidObjectType
D:\rn\manager\node_modules\react-native\Libraries\Renderer\ReactNativeRenderer-dev.js:7436:6
Because this error means nothing to me, I decide to enable "Debug JS Remotely" in Chrome to see if I can get an error I understand. But with Debug Remotely enabled, the error goes away.
If I build the project and install the app on a real device, the errors come back.
But I feel like I'm stuck in a catch-22 because if I try to debug, I get no errors, and if I turn off debugging, I get errors.
Is there anyway to get around this?
Thanks!
The error mentions you use an object in your render() method where you shouldn't. Since you did not post any code, here is what you could do:
Keep removing elements from your render() method until you no longer get the error. Once it is gone, start placing code back until you hit the error again. The code causing the error will be or return an object, possibly a typo causing an object to be returned instead of a string for instance.
TL;DR: Stopped using firebase and used react-native-firebase instead
The problem for me wasn't the render method in any of my components or classes. I realized after trying the answer above, I basically removed all my files, and was left with one file. I changed the render method to display text inside one view, but I still got the error.
Then I started removing the modules I was importing inside that file one by one and found that it was the firebase module uninstalled firebase and installed react-native-firebase.

TypeError: Cannot assign read only property 'delegatedHandlers' of aurelia-dom-boundary

I've been working on modifying the Aurelia skeleton app, and things have been going along fine. Then I added in two new jspm dependencies, bootstrap-material and aurelia-validation. Once I did that, I started getting the following two errors.
ERROR [app-router] TypeError: Cannot assign to read only property 'delegatedHandlers' of aurelia-dom-boundary
ERROR [app-router] Router navigation failed, and no previous location could be restored.
I cannot get past this. I've tried removing those dependencies, reverting things back to when they were working and I still get the errors. Any idea what could be causing it?
I believe this is just a regression in Aurelia binding library caused by this commit: https://github.com/aurelia/binding/commit/8d33813eb340c2136198916a4a757a2c577f5aab
let boundary = target.domBoundary || document,
delegatedHandlers = boundary.delegatedHandlers || (boundary.delegatedHandlers = {}),
...
I have made a comment, but did not open an Issue.
I rolled back the binding library from 0.8.4 to 0.8.2 until a fix is released.
Edit: they have fixed the issue

Extjs 3.2 : Js error in built function "onDocumentReady"

I`m getting js error, after loading below function,
Ext.onReady(function(){
aFunc123([{header:'ss',Fn:'aFunc1(1)'}],"",undefined,{showCheck:true})
})
After coming out of "aFunc123" function,extjs immediatly calls "onDocumentReady" function, problem is, passed arguments are undefined,and also I dont know how it`s getting called.Please check out, for this problem I`m getting error like `"Unable to get property 'apply' of undefined or null reference"`.
Please suggest me what wrong I`m doing here.
I`m using ExtJS 3.2,IE10.
Thanks in advance.
Ext 3.4.1a was released recently to add IE10 support. You can download it from the Ext website. Otherwise, older versions don't have support for IE10.

Dojo Nodelist-traverse Error

I'm having trouble using Dojo's Nodelist-traverse methods.
I'm using Dojo 1.4.3 (required by the CMS, can't upgrade at this time) and I'm starting out with:
dojo.require("dojo.NodeList-traverse");
I don't get any errors on the require call, but I can't use any of the methods without an error.
dojo.query(".my-class").parent();
Elicits the error:
TypeError: this._wrap is not a function
And I get that with all the methods: parents(), child(), sibling(), every one listed on the doc page: http://dojotoolkit.org/reference-guide/dojo/NodeList-traverse.html#dojo-nodelist-traverse
My goal is to add a class to the parent anchor tag, but I can't even get the methods to load.
Not sure what I'm doing wrong.
Thanks in advance for all input.