function [status, errMsg] = udtPostApply(blockObj,dlg)
% udtPostApply(blockObj)
%
%
%   blockObj = top-level UDD object for the block (the one
%              that getDialogSchema() is called on)
%
%  This function is intended to to be used in the getDialogSchema
%  function:
%
%  function dlgstruct = getDialogSchema(h, name)
%    % construct schema
%    dlgstruct.PostApplyCallback = 'udtPostApply';
%    dlgstruct.PostApplyArgs = {h};

% Copyright 2005-2010 The MathWorks, Inc.

% If the dialog has a widget called 'fvToolButton', enable it:
if dlg.isVisible('fvToolButton') && ~dlg.isEnabled('fvToolButton')
    dlg.setEnabled('fvToolButton',1);
end

% Block specific (e.g., UDT parameter) post-apply validation
[status, errMsg] = blockObj.validatePostApplyChanges();

% [EOF]
