Show constant properties of enumeration class in autocomplete
조회 수: 2 (최근 30일)
이전 댓글 표시
I am using MATLAB Version R2015b. I have an enumeration class as follows:
classdef EnumClass
enumeration
E1 ('E1'),
E2 ('E2')
end
methods
function object = EnumClass(arg1)
object.FAUX_CONST_PROP = ['This property relates to ' arg1];
end
end
properties(Constant = true)
FAUX_CONST_PROP = 'test_value';
end
end
Accessing the FAUX_CONST_PROP works as desired, however I can not get an autocomplete to work unless I set a separate variable to one of my enum values
>> EnumClass.E2.FAUX_CONST_PROP (autocomplete does not work)
>> tempVar = EnumClass.E2;
>> tempVar.FAUX_CONST_PROP (autocomplete works)
My question is why must I set my enum to a temporary value to get the list of immutable properties?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Handle Classes에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!