www.gusucode.com > vnt工具箱matlab源码程序 > vnt/vntblks/vntmasks/private/privatecanslvarname.m
function privatecanslvarname(dialog) %PRIVATECANSLVARNAME Apply the selected variable after validation. % % PRIVATECANSLVARNAME (DIALOG) Apply the selected filname after % validation. % SS 03-01-11 % Copyright 2011 The MathWorks, Inc. % Get the dialog source. obj = dialog.getDialogSource; % Get the variable name. varName = obj.Block.VariableName; if isvarname(varName) % Valid obj.VariableName = obj.Block.VariableName; return; else % Get error strings. msgStrings = privatevntslstring('errorstrings'); errMsg = sprintf(msgStrings.VarNameInvalid, varName); tamslgate('privatesldialogbox', dialog, errMsg, ... msgStrings.ErrorDialogTitle); obj.Block.VariableName = obj.VariableName; end