www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgdatasetnode/canpaste.m

    function ret=canpaste(nd,data)
% CANPASTE  Indicate whether node can paste data
%
%  OUT = CANPASTE(NODE,DATA)  returns 1/0 to indicate whether the node is
%  currently in a state to paste in the given data.

%  Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc.


if isnumeric(data)
    h = cgbrowser;
    d = h.getViewData;
    if d.currentviewinfo==3
        % only table view can paste
        ret = d.Handles.Table.Peer.canPaste;
    else
        ret = false;
    end
else
    ret = false;
end