Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with order of actions #1140

Open
lpatiny opened this issue Dec 4, 2019 · 0 comments
Open

Problem with order of actions #1140

lpatiny opened this issue Dec 4, 2019 · 0 comments

Comments

@lpatiny
Copy link
Collaborator

lpatiny commented Dec 4, 2019

When loading a module you have an event that generate an action when the module is loaded. The problem is that you want to be sure that the action already exists otherwise it will not be executed obviously.

In order to be 'sure' that the action exists I add it in the general preferences. However I get random results. Apparently in some case the action out from the module is executed before the general preferences action has been loaded and I don't understand why.

The relate loading order is I think here:

var view = Versioning.getView();
var data = Versioning.getData();
Promise.all([
loadCustomFilters(),
loadMainVariables(),
configureRequirejs(),
loadCustomModules()
])
.then(doInitScript)
.then(
function () {
ActionManager.viewHasChanged(view);
ModuleFactory.getModules().forEach(function (module) {
if (
module.controller &&
typeof module.controller.onGlobalPreferenceChange === 'function'
) {
module.controller.onGlobalPreferenceChange();
}
});
_modulesSet.then(checkCustomModules, checkCustomModules);
},

@targos targos removed their assignment Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants