Auto complete inputs of method using object property
Mostra commenti meno recenti
Hey,
I have a class with a property that I would like to use for auto completion:
classdef TestClass
properties
Names
end
methods
function self = TestClass(names)
arguments
names (1,:) string
end
self.Names = names;
end
function printName(self, name)
mustBeMember(name, self.Names)
disp(name)
end
end
end
So when I call the method 'printName', I would like matlab so suggest the possible options, i.e. the elements of the property 'Names'.
How can I do that?
1 Commento
Shivam Gothi
il 17 Set 2024
you can achieve the objecive by JSON-formatted file called functionSignatures.json
The below given link for the documentation explains in detail about it:
Additionally you may refer to the MATLAB answers link:
To validate your "functionSignatures.json" files you can use command "validateFunctionSignaturesJSON". Refer to the below documentation for more help:
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su JSON Format 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!


