Borrar filtros
Borrar filtros

App designer: Dot indexing is not supported for variables

41 visualizaciones (últimos 30 días)
Medical Imaging
Medical Imaging el 5 de Ag. de 2020
Respondida: Alon Zaharony el 28 de Abr. de 2022
I am creating the UI using app designer and at line 124 I am getting error about dot indexing problem. I have also posted the question before did not get the desired answer. Here attaching the mlapp file. Please provide help got stuck since long.
Dot indexing is not supported for variables of this type.
Error in DataProcess_July2020/LoadB0datacalculatefieldmapButtonPushed (line 124)
app.idx = listdlg('ListString', {app.sFOLDERS(:).name}, 'SelectionMode', 'single', ...
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 382)
Error while evaluating Button PrivateButtonPushedFcn.

Respuestas (2)

Kiran Felix Robert
Kiran Felix Robert el 17 de Ag. de 2020
Hi Medical Imaging,
I understand that you are trying to access the ‘name’ field of the app.sFOLDERS structure
The reason behind the error is that, when the control flows to line 124, the ‘app.sFOLDER’ does not contain the ‘name’ field. Moreover, it is not even a structure it is just an empty array of type double.
You can verify this by displaying the contents of app.sFOLDER just before line 124 (Try adding breakpoints).
or try,
Assigning the app.sFOLDERS structure to the file/folders list before using the name field might solve the issue .
(From your appDesigner code I also understand that the app.sFOLDERS is assigned the output of the ‘dir’ command in the ‘LoadFileandprocessFIDButtonPushed’ callback function, verify if this callback assigns the correct structure to the app.sFOLDERS’ from your end.)
Hope this Helps.
Kiran Felix Robert
  1 comentario
Medical Imaging
Medical Imaging el 18 de Ag. de 2020
Thank you foer the response. I tried to add class(app.sFolders) before line 124 and tried app.sFOLDER too, it is showing me the error.May be I am entering it in wrong way. I have not much hand-on to the App-Designer. How could I enter it in a way to pass the output for processing.
Please advice.
Thank you.

Iniciar sesión para comentar.

Alon Zaharony
Alon Zaharony el 28 de Abr. de 2022
I had the same issue. Eventually, i've figured out that the problem is related to a parameters file i am using that was missing in the compiled version.
The file (called "param.ini") was in my projects folder and i used the PWD function to call it.
For some reason, on the compiled version, the PWD gave me the following path:
Since the file wasn't there, it hasn't been loaded and as a result the parameters were missing.
Optional solutions:
1) when compiling, make sure to add all the required functions and files to the "Files required for your application to run".
2) Don't use PWD for compiled apps. Instead, use specific path.
Hopefully it will help someone in the future.


Más información sobre File Operations en Help Center y File Exchange.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by