I cannot get vue-logger to work in my Vuex store file(s)
I would like to use vue-logger in my Vuex store file (and modules). However, I keep getting the error: "TypeError: Cannot read property 'info' of undefined" when I execute a statement like "Vue.log.info(....)".
I had a similar problem with using "this.$http.get" in the store file, but that works now by using the "Vue.http.get" (as explained in this StackOverflow Answer).
However, "this.$log.info" does not work (for reasons obvious to me now, as in the store I am outside of the vue instance), but neither does "Vue.log.info".
How can I use vue-logger in the store?
Try to use Vue.$log.info.
Notice the extra $ before log.
Related
I have to load multiple I18N-properties that have the same sharing content into an array. I've tried
arrayIDs = oBundle.getText().includes(".id.");
It said that it can't read the property 'includes' of undefined. Most likely because there isn't anything in getText(). But this has to be variable. This method is made for one property, is there something where I can get multiple properties?
edit: nvm I solved it... If you have the same problem: I discovered
oBundle.aPropertyFiles[0].getKeys();
for myself and this gets all the keys of the I18N properties you need. After that you can make oBundle.getText(key) to get the according text and implement your own filtering logic.
I would like to write a getter to return this.$nuxt.$loading from a vuex store file.
(https://nuxtjs.org/api/configuration-loading/)
This question is linked to my other question: Nuxt/Vue: How to position custom loading component
And now I thought of listening to this loading property to display my Loading component within the page.
The Loading property looks like this:
So I would like to return this.$nuxt.$loading.data.$route.show from the vuex store. If it is true, I want to show my custom loader and if its false not – of course.
To do that I would like to access this.$nuxt but this is undefined in my vuex store. It is only present in my components...
I tried $nuxt – same result.
I don't know if this is right or at least one way to achieve what I want, and I am definitely open for suggestions.
Thanks in advance.
Cheers
You can use window.$nuxt for this.
I used this._vm.
You can see it in there if you do console.log(this) in Vuex.
Here is an example of what I'm trying to do with Sencha Ext JS 6.5.2 Modern:
https://fiddle.sencha.com/#view/editor&fiddle/2b2i
I am trying to use an ArrayStore to load some values into the combobox. When I click on the drop down arrow, or search, I get an error stating that:
Cannot read property 'getFilters' of null
The problems seems that it is not loading the data correctly, and 'me.getStore()' returns null.
Am I not using the 'store' properly?
After some digging into the API and trying to find numerous examples across the web, I believe I figured it out.
I was setting the 'store' key as a string. slap head, instead of a config object. I changed that from:store: 'states' to store: { type: 'states' }
I also had the wrong field specified in the model: displayAS vs displayAs.
once I did this, everything worked as expected.
Please check the docs to find that ExtJS stores have no alias config. You may want to change your store identification from alias to storeId.
Also, check the store config of the combobox to find that ExtJS takes "either a Store instance, configuration object or store ID", but does not instantiate a new store by alias.
So you have to instantiate a new states store instance before your combobox is rendered. For the instantiation of stores of which only one instance should exist throughout the app, I can recommend adding them to the stores config of the Application.
When I try to run Facebook's geolocation example, I get the error:
Cannot read property 'getCurrentPosition' of undefined on a red screen. When I just load up a mapview and set the follow user property to be TRUE, the gps is working properly in the simulator.
Any idea what's going on?
Sounds like RCTLocationObserver is undefined, meaning RCTGeolocation is likely not linked properly.
You'll need to link to it in the build settings as outlined here: https://github.com/facebook/react-native/issues/197
Or if you are using CocoaPods, add it to your Podfile.
There are a few things it could be. In my case, I was using a Navigator component in the same file, and importing it seems to override the navigator global. Try logging navigator and seeing what properties are set on it.
If you see 'ProxyComponent', and things associated with gestures, you're in the same boat I was, and doing your navigator.geolocation calls outside of the Navigator file will solve the issue.
I am using Openerp (Version 7.0-20140429-231256). It was working well for a while one bad day I got a below error. And I don't find any reference to solve the exception.
OpenERP Client Error
Uncaught TypeError: Cannot read property 'prototype' of null
http://localhost:8069/web/webclient/js?db=openerp:3268
In process of debug I wanted to get to the root of problem. Some how I observed that there is openerp.init jquery triggers all the modules where its missing most of the modules which are installed..
i.e.
<script type="text/javascript">
$(function() {
var s = new openerp.init(["web", "web_kanban", "base", "base_setup", "process", "base_import", "web_view_editor", "web_calendar", "web_diagram", "board", "web_gantt", "web_graph", "web_tests"]);
var wc = new s.web.WebClient();wc.appendTo($(document.body));
});
</script>
Though I have installed many module like Point of Sale, Ware house management, Mailing etc. Its not included in init function.
I have installed several module available in openerp not community modules. Am not able to move forward with this error. Please help me how I can able to fix this problem.
Thanks In Advance.
I have solved this problem myself.
Though want to share details with you. So that anyone come across same, then this reference might be helpful.
After debugging the code have found that module information are stored in one particular table called ir_module_module, in this table it store the state of module..
i.e.
1. installed
2. uninstalled
3. to remove
So when we start openerp server then it fetch for modules for js to load which are installed state.
But many of modules are in to remove state. So I used update statement for postgressql (which is similar to mysql) to update all to remove to installed
here is update statement which is used to update table.
update ir_module_module set state ='installed' where state='to remove';
**Though I have no idea how in first play module went into to remove state.