3
3
%
4
4
% MLAPPTOOLS methods:
5
5
6
- properties (Constant )
7
- querytimeout = 5 ; % Dojo query timeout period, seconds
6
+ properties (Access = private , Constant = true )
7
+ QUERY_TIMEOUT = 5 ; % Dojo query timeout period, seconds
8
8
end
9
9
10
10
methods
@@ -22,8 +22,8 @@ function textAlign(uielement, alignment)
22
22
23
23
[win , widgetID ] = mlapptools .getWebElements(uielement );
24
24
25
- alignsetstr = sprintf(' dojo.style(dojo.query("#%s ")[0], "textAlign", "%s ")' , widgetID , alignment );
26
- win .executeJS(alignsetstr );
25
+ alignSetStr = sprintf(' dojo.style(dojo.query("#%s ")[0], "textAlign", "%s ")' , widgetID , alignment );
26
+ win .executeJS(alignSetStr );
27
27
end
28
28
29
29
@@ -32,8 +32,8 @@ function fontWeight(uielement, weight)
32
32
33
33
[win , widgetID ] = mlapptools .getWebElements(uielement );
34
34
35
- fontwtsetstr = sprintf(' dojo.style(dojo.query("#%s ")[0], "font-weight", "%s ")' , widgetID , weight );
36
- win .executeJS(fontwtsetstr );
35
+ fontWeightSetStr = sprintf(' dojo.style(dojo.query("#%s ")[0], "font-weight", "%s ")' , widgetID , weight );
36
+ win .executeJS(fontWeightSetStr );
37
37
end
38
38
39
39
@@ -42,8 +42,8 @@ function fontColor(uielement, newcolor)
42
42
43
43
[win , widgetID ] = mlapptools .getWebElements(uielement );
44
44
45
- fontwtsetstr = sprintf(' dojo.style(dojo.query("#%s ")[0], "color", "%s ")' , widgetID , newcolor );
46
- win .executeJS(fontwtsetstr );
45
+ fontColorSetStr = sprintf(' dojo.style(dojo.query("#%s ")[0], "color", "%s ")' , widgetID , newcolor );
46
+ win .executeJS(fontColorSetStr );
47
47
end
48
48
end
49
49
@@ -54,7 +54,7 @@ function fontColor(uielement, newcolor)
54
54
mlapptools .togglewarnings(' off' )
55
55
56
56
tic
57
- while true && (toc < mlapptools .querytimeout )
57
+ while true && (toc < mlapptools .TIMEOUT )
58
58
try
59
59
% Add check for container change in R2017a (version 9.2)
60
60
if verLessThan(' matlab' , ' 9.2' )
@@ -74,11 +74,11 @@ function fontColor(uielement, newcolor)
74
74
end
75
75
mlapptools .togglewarnings(' on' )
76
76
77
- if toc >= mlapptools .querytimeout
77
+ if toc >= mlapptools .QUERY_TIMEOUT
78
78
msgID = ' mlapptools:getWidgetID:QueryTimeout' ;
79
79
error(msgID , ...
80
80
' WidgetID query timed out after %u seconds, UI needs more time to load' , ...
81
- mlapptools .querytimeout );
81
+ mlapptools .QUERY_TIMEOUT );
82
82
end
83
83
end
84
84
@@ -94,7 +94,7 @@ function fontColor(uielement, newcolor)
94
94
widgetquerystr = sprintf(' dojo.getAttr(dojo.query("[data-tag^=''%s'' ] > div")[0], "widgetid")' , data_tag );
95
95
96
96
tic
97
- while true && (toc < mlapptools .querytimeout )
97
+ while true && (toc < mlapptools .QUERY_TIMEOUT )
98
98
try
99
99
widgetID = win .executeJS(widgetquerystr );
100
100
widgetID = widgetID(2 : end - 1 );
@@ -111,11 +111,11 @@ function fontColor(uielement, newcolor)
111
111
end
112
112
mlapptools .togglewarnings(' on' )
113
113
114
- if toc >= mlapptools .querytimeout
114
+ if toc >= mlapptools .QUERY_TIMEOUT
115
115
msgID = ' mlapptools:getWidgetID:QueryTimeout' ;
116
116
error(msgID , ...
117
117
' WidgetID query timed out after %u seconds, UI needs more time to load' , ...
118
- mlapptools .querytimeout );
118
+ mlapptools .QUERY_TIMEOUT );
119
119
end
120
120
end
121
121
0 commit comments