Custom UI Components are removed from re-opened app file
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Custom UI Components that I have created work as expected in an app (.mlapp) file. However, after closing the app file, upon reopening it, a warning dialog appears indicating that "Some components in this file could not be loaded."
I have been working on three components (which cannot be posted). All of them work separately and together in the app file as expected. However, if I load any one of them, or all three, into the app file, close the app file, and reopen it, any and all Custom UI Components are removed from the re-opened file.
I tried creating a new .mlapp file into which the components were placed. The results were the same.
Any help on keeping the components in the app file would be appreciated.
I do not know if this is related, but, for what it is worth, I followed the instructions on this page to configure each component before placing it in an app file:
Step three states: "click Add to Path to add the component and generated resources folder to the MATLAB path."
The way I understand that phrase, it means there should be two paths for each component. However, clicking Add to Path only ever adds one, pointing to the folder containing the component. Each time I attempted to manually add the "resources" folder using pathtool, I receive the following error:
You cannot add class folders (ones that start with '@'), package folders (ones that start with '+'), folders named 'resources', or private folders to the MATLAB search path.
Another possibly related point is that any MATLAB Project also has a resources folder. Two of the three components I referred to are in Project folders. However, one is not—that component, like the other two, is always automatically removed from any .mlapp file.
3 Commenti
sunkuru jagabandhu
il 14 Ago 2023
There are several possibility of this issue
- First thing is there should be an issue with the components or some runtime error which are not detected.
- In case you have tables in the component and binded with the displaydata change event(callback) then also you will get this kind of issue.
- May be one more possibility is use of special characters in any resource files
- In myexprinence with the custom ui components, The update method should have very minimal functionality. if you want to have intensive operation then you should do it with valid entry or exit flags and conditions.
Levi Blake
il 30 Ott 2023
Modificato: Levi Blake
il 30 Ott 2023
@dpb The page you links does not say that the resources file should be in the location as the .mlapp file. It states that the folder should be placed there, which is the default behavior when you configure the app.
I have this same issue despite the custom component's .mlapp file and resources folder already being in the folder selected for the seach path before I open Matlab
Risposta accettata
goc3
il 1 Ago 2023
1 Commento
dpb
il 1 Ago 2023
A lot of the debugging stuff is more difficult to find with the app developer it seems.
Does seem like a peculiar way it became apparent; you might consider creating a miniature test demo that can create the problem and submit it as an enhancement request to TMW to see if they can find a way to diagnose the problem.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Develop Apps Using App Designer in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!