我将传入的StringList赋给类的私有成员。
如:
procedure TRight.SetOperatorPower(poPowerList:TStringList);
begin
  FoPowerList := poPowerList;
end;FoPowerList 为类TRight的私有成员

解决方案 »

  1.   

    FoPowerList:=TStringList.Create;
    FoPowerList := poPowerList;
      

  2.   

    procedure TRight.SetOperatorPower(poPowerList:TStringList);
    begin
      if not Assigned(FoPowerList) then
        FoPowerList := TStringList.Create;
      FoPowerList.Assign(poPowerList);
    end;
      

  3.   

    FoPowerList:=TStringList.Create;
    FoPowerList := poPowerList;
    这样就行
      

  4.   

    var
      a,b:TStrings;
    begin
      try
        a:=TStringList.Create;
        b:=TStringList.Create;
        a.Add('Hello');
        b.Assign(a);
      finally
        a.Free;
        b.Free;
      end;
    end;
      

  5.   

    procedure TRight.SetOperatorPower(poPowerList:TStringList);
    begin
      if not Assigned(FoPowerList) then
        FoPowerList := TStringList.Create;
      FoPowerList.Assign(poPowerList);
    end;