我如何在Delphi中向这种数组添加项目?

问题描述

我有一个名为apps的变量,我认为它是一个动态数组:

  apps2      = array of app3;

  app3 = class(TRemotable)
  private
    Fname_: appNameType;
    Fid: appIdType;
  published
    property name_: appNameType  Index (IS_UNQL) read Fname_ write Fname_;
    property id:    appIdType    Index (IS_UNQL) read Fid write Fid;
  end;

我有一个类inititateTechnicalRegistration,我必须将一些值传递给它的apps属性。我该怎么办?

initiateTechnicalRegistration_Type = class(TRemotable)
  private
    FpartnerName: partnerNameType;
    FpartnerOrganizationIdentifier: partnerOrganizationIdentifierType;
    Fapps: apps2;
    Fapps_Specified: boolean;
    Fdescription: descriptionType;
    Fdescription_Specified: boolean;
    FcontactEmail: contactEmailType;
    FrequestedRole: Array_Of_roleType;
    FpublicKey: string;
    FpartnerAddress: partnerAddressType;
    FpartnerAddress_Specified: boolean;
    FpartnerURL: partnerURLType;
    FpartnerURL_Specified: boolean;
    procedure Setapps(Index: Integer; const Aapps2: apps2);
    function  apps_Specified(Index: Integer): boolean;
    procedure Setdescription(Index: Integer; const AdescriptionType: descriptionType);
    function  description_Specified(Index: Integer): boolean;
    procedure SetpartnerAddress(Index: Integer; const ApartnerAddressType: partnerAddressType);
    function  partnerAddress_Specified(Index: Integer): boolean;
    procedure SetpartnerURL(Index: Integer; const ApartnerURLType: partnerURLType);
    function  partnerURL_Specified(Index: Integer): boolean;
  public
    constructor Create; override;
    destructor Destroy; override;
  published
    property partnerName:                   partnerNameType                    Index (IS_UNQL) read FpartnerName write FpartnerName;
    property partnerOrganizationIdentifier: partnerOrganizationIdentifierType  Index (IS_UNQL) read FpartnerOrganizationIdentifier write FpartnerOrganizationIdentifier;
    property apps:                          apps2                              Index (IS_OPTN or IS_UNQL) read Fapps write Setapps stored apps_Specified;
    property description:                   descriptionType                    Index (IS_OPTN or IS_UNQL) read Fdescription write Setdescription stored description_Specified;
    property contactEmail:                  contactEmailType                   Index (IS_UNQL) read FcontactEmail write FcontactEmail;
    property requestedRole:                 Array_Of_roleType                  Index (IS_UNBD or IS_UNQL) read FrequestedRole write FrequestedRole;
    property publicKey:                     string                             Index (IS_UNQL) read FpublicKey write FpublicKey;
    property partnerAddress:                partnerAddressType                 Index (IS_OPTN or IS_UNQL) read FpartnerAddress write SetpartnerAddress stored partnerAddress_Specified;
    property partnerURL:                    partnerURLType                     Index (IS_OPTN or IS_UNQL) read FpartnerURL write SetpartnerURL stored partnerURL_Specified;
  end;

  initiateTechnicalRegistration = class(initiateTechnicalRegistration_Type)
  private
  published
  end;

所以我想在运行时或通过其他可能的方式从某些TEdit传递一些值,但是我以前从未使用过这类变量,我该怎么做?

initiateTechnicalRegistration1.apps:=

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)