Tab completion of struct within cell
Mostra commenti meno recenti
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
Risposta accettata
Più risposte (1)
Ken Atwell
il 23 Mar 2019
1 voto
If you can try the just-released R2019a, MATLAB will now tab completion in this situation.
1 Commento
Anna
il 25 Mar 2019
Categorie
Scopri di più su Structures in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!