Tab completion of struct within cell
Mostrar comentarios más antiguos
Hello together,
I am working on a large object-oriented database where it happens that I store structs or instances of classes within a cell. However, I experience that the autocomplete or tab completion function of Matlab does not work anymore after the cell. So, for example I define a struct "structTest":
structTest.a = 2;
structTest.b = 4;
The autocompletion works fine:

Now I save this struct within the cell "cellTest":
cellTest = cell(2,1);
cellTest{1,1} = structTest;
Unfortunately, the autocompletion does not work anymore:

Similarly, the problem occurs when I save instances of classes within a cell.
After reading about .json files for tab completion of functions and overriding the properties(obj) function in the class definition with fieldnames(obj), I still don't have a clue on how to deal with this. Especially since fieldnames(cellTest{1,1}) works just fine:
>> fieldnames(cellTest{1,1})
ans =
2×1 cell array
{'a'}
{'b'}
Any suggestions on this? It would be of great advantage, as users sometimes have to navigate quite deeply into the database.
Thank you very much for your help,
Anna
Respuesta aceptada
Más respuestas (1)
Ken Atwell
el 23 de Mzo. de 2019
1 voto
If you can try the just-released R2019a, MATLAB will now tab completion in this situation.
1 comentario
Anna
el 25 de Mzo. de 2019
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!