Skip to content

Commit 289d608

Browse files
committed
Replaced hard-coded QUERY_TIMEOUT string with a constant.
1 parent 3267a8f commit 289d608

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

mlapptools.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
properties (Access = private, Constant = true)
2424
QUERY_TIMEOUT = 5; % Dojo query timeout period, seconds
25+
TAG_TIMEOUT = 'QUERY_TIMEOUT';
2526
end
2627

2728
methods (Access = public, Static = true)
@@ -252,7 +253,7 @@ function fontWeight(uiElement, weight)
252253

253254
function setTimeout(hUIFig, newTimeoutInSec)
254255
% Sets a custom timeout for dojo queries, specified in [s].
255-
setappdata(hUIFig, 'QUERY_TIMEOUT', newTimeoutInSec);
256+
setappdata(hUIFig, mlapptools.TAG_TIMEOUT, newTimeoutInSec);
256257
end
257258

258259
function textAlign(uiElement, alignment)
@@ -376,7 +377,7 @@ function textAlign(uiElement, alignment)
376377
end % getWidgetID
377378

378379
function to = getTimeout(hFig)
379-
to = getappdata(hFig,'QUERY_TIMEOUT');
380+
to = getappdata(hFig, mlapptools.TAG_TIMEOUT);
380381
if isempty(to), to = mlapptools.QUERY_TIMEOUT; end
381382
end % getTimeout
382383

0 commit comments

Comments
 (0)