Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 26-04-2011
naverus naverus is offline
Registrado
 
Registrado: feb 2008
Posts: 3
Poder: 0
naverus Va por buen camino
ArrayOfAnyType

Hola:

Hice la conexión a un webservice (Visual C) , pero uno de los métodos requiere de arreglos de tipo ArrayOfAnytype, el problema es que esta clase no tiene un método add, alguien sabe como se puede manejar esta clase?
Código Delphi [-]
  
  ArrayOfAnyType = class(TRemotable)
  private
    FanyType: anyType;
  public
    FList: TList;
    constructor Create; override;
    function   GetVariantArray(Index: Integer): Variant;
    function   GetVariantArrayLength: Integer;
    property   VariantArray[Index: Integer]: Variant read GetVariantArray; default;
    property   Len: Integer read GetVariantArrayLength;
    procedure Add(Valor : TRemotable);
  published
    property anyType: anyType read FanyType write FanyType;
  end;

-------------------------------------------------------------------------
Código Delphi [-]
procedure ArrayOfAnyType.Add(Valor: TRemotable);
begin
  FList.Add(Valor);
end;

constructor ArrayOfAnyType.Create;
begin
  inherited Create;
  FSerializationOptions := [xoInlineArrays];
  FList := TList.Create();
end;

function ArrayOfAnyType.GetVariantArray(Index: Integer): Variant;
begin
  Result := FanyType[Index];
end;

function ArrayOfAnyType.GetVariantArrayLength: Integer;
begin
  if Assigned(FanyType) then
    Result := Length(FanyType)
  else
  Result := 0;
end;

Última edición por ecfisa fecha: 26-04-2011 a las 23:07:18. Razón: Etiquetas [DELPHI] y [/DELPHI]
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 16:35:41.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi