www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgsurfview/@inputlist/pGetFromTable.m

    function pGetFromTable(obj, row)
%PGETFROMTABLE Get a variable's value from input table
%
%  PGETFROMTABLE(OBJ, ROW) gets the specified row from the input editing
%  table and saves it in the inputlist store in the appropriate CAGE
%  variable.

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


sendchange = false;
for n = 1:length(row)
    key = obj.hTable.VariableTypes(row(n));
    value = obj.hTable.VariableValues{row(n)};
    ptr = obj.Inputs(row(n));

    if key==2 || key==3
        % Mark vector stores as appropriate type
        ptr.info = ptr.setstorevalue(obj.StoreGUID, 0, key, false);
    end

    if key<4 && ~isempty(value)
        ptr.info = ptr.setstorevalue(obj.StoreGUID, key, value, false);
        sendchange = true;
    end
end

if sendchange
    send(obj,'ValueChange',handle.EventData(obj,'ValueChange'));
end