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

R2023a compatibility issues and suggestions #29

Open
Daemund opened this issue Mar 31, 2023 · 1 comment
Open

R2023a compatibility issues and suggestions #29

Daemund opened this issue Mar 31, 2023 · 1 comment

Comments

@Daemund
Copy link

Daemund commented Mar 31, 2023

Summary

Was trying to apply CSS to my GUI using this excellent tool and encountered a few issues in newer releases, at least R2022b and R2023a. Here below are things that I have encountered.
Note: Have not tested all functionalities of mlapptools

Problem Description

  1. The data-tag is no longer stored according to:
    data_tag = char(struct(uiElement).Controller.ProxyView.PeerNode.getId);
  2. uigridlayout not supported
  3. Name of warning identifier in toggleWarnings has changed
  4. Slow performance when accessing many WidgetID's due to the version check in getWebWindow (not really an error)

My current workarounds:

  1. In getDataTag, line 360:
    data_tag = char(struct(uiElement).Controller.ViewModel.Id);
    Note: This is only needed for R2023a (and onwards?) so the old code should be still be used for older version, now have an if-statement that use the matlab version (see point 4).
  2. In getWebElements, line 127, add uigridlayout:
    case {'uipanel','figure','uigridlayout'}
  3. In toggleWarning, line 436, use this warning ID instead:
    OJF = 'MATLAB:ui:javaframe:PropertyToBeRemoved';
  4. Not sure about the best solution, I have now added the matlab version as an input argument to getWebElements to avoid version lookups on each function call.

Specifications

  • MATLAB Release: R2023a
  • Operating System: Win 10
  • mlapptools version (or commit link/hash): v0.4.1
@Dev-iL
Copy link
Member

Dev-iL commented Mar 31, 2023

Hello! Please try the develop branch, it's much newer than the released version, and at least one of your points was addressed there. Regardless, if you think you know how to improve the existing code, to make it more robust, performant, etc. - please submit a PR!

Regarding the slowness querying the MATLAB version, I suppose we can modify mlapptools to be a non-static class, and the version will checked only once during construction.

I'm very limited in my ability to fix bugs etc., since I only have access to MATLAB Online unfortunately, and it works differently...

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