PropInfo := GetPropInfo(Obj,'DataSet');
if (PropInfo<>nil) and (PropInfo.PropType=tkClass) then
begin
  obj := PropInfo.GetProc;
  PropInfo := GetPropInfo(obj,'Active');
  if PropInfo<>nil then
  ....
end

解决方案 »

  1.   

    niu_zai(牛仔) :很抱歉你的方法不行。GetProc and SetProc are method pointers,不能转化为TObject。另外,(PropInfo.PropType=tkClass) 应该是(PropInfo.PropType^.Kind=tkClass)。不过感谢你的参与,这个问题有点难度。—————————————————————————————————
    MaximStr := '宠辱不惊,看庭前花开花落,去留无意;
                 毁誉由人,望天上云卷云舒,聚散任风。';
    I.Maxim := MaximStr;
    I.Desire := '加不加分随你';
    —————————————————————————————————
      

  2.   

    PropInfo := GetPropInfo(Obj,'Tag');是不是写错了?
      

  3.   

    datasource1.DataSet.Active := False;不可以吗?