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

MX 7.4 issue with conditional visibility #103

Closed
JelteMX opened this issue Jul 11, 2017 · 6 comments
Closed

MX 7.4 issue with conditional visibility #103

JelteMX opened this issue Jul 11, 2017 · 6 comments

Comments

@JelteMX
Copy link
Contributor

JelteMX commented Jul 11, 2017

Comment from #102 from @recktenwaldfabian


The problem that I encounter is, that the widget is initialized and directly uninitialized again (only happens in 7.4, probably due to refresh+conditional visibility).
I don’t have a small test project for this yet.

What happens: in a mx.data callback in PieChart.js:111
html.set(this._numberNode, content !== null ? content.toString() : "");

this._numberNode is undefined (probably because the widget is already _destroyed).

The fix would consist of checking if this._destroyed===true before calling _processData.

Can you suggest on how to proceed with this? I’m already spending too much time looking for platform issues and setting up test projects…

@JelteMX
Copy link
Contributor Author

JelteMX commented Jul 11, 2017

Makes sense, I'll see if we can fix that

@JelteMX
Copy link
Contributor Author

JelteMX commented Jul 11, 2017

I will also test it in a test-project here

@recktenwaldfabian
Copy link

I just added this to Core.js and replace usage of _processData with _processDataChecked

        // assert that widget is not already destroyed before processing data
        _processDataChecked: function() {
          if ( this._destroyed ) {
            logger.debug(this.id + " is already destroyed");
          } else {
            this._processData();
          }
        },

@JelteMX
Copy link
Contributor Author

JelteMX commented Jul 11, 2017

Got it, came up with something similar. Can you test this version for me?

@recktenwaldfabian
Copy link

recktenwaldfabian commented Jul 11, 2017 via email

@JelteMX
Copy link
Contributor Author

JelteMX commented Jul 11, 2017

You're right, let's not do that :-). Thanks! I'll update the code and create a new release

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