Fórum Arrays.. #332521
01/11/2006
0
eu instanciei um array de
Matriz: Array[1..10,1..10] of String;
dai preciso passar esse array pra um objeto
tipo
objeto: Tminhaclasse;
...
objeto := Tminhaclasse.create(Self,Matriz);
..
no constructor da classe colokei
constructor Create(AOwner: TComponent; Proof: Array of String); reintroduce;
pq ele da tipos incompativeis??
pq do array composto?
como poderia realizar isso sem erros?
agradeÃ?o qm poder me auxiliar..
Matriz: Array[1..10,1..10] of String;
dai preciso passar esse array pra um objeto
tipo
objeto: Tminhaclasse;
...
objeto := Tminhaclasse.create(Self,Matriz);
..
no constructor da classe colokei
constructor Create(AOwner: TComponent; Proof: Array of String); reintroduce;
pq ele da tipos incompativeis??
pq do array composto?
como poderia realizar isso sem erros?
agradeÃ?o qm poder me auxiliar..
Nightshade
Curtir tópico
+ 0
Responder
Posts
01/11/2006
Marco Salles
Talvez isto resolva... Por analogia...
Type
TUmaMatriz = class
Matriz : Array[1..10,1..10] of String;
end;
Type
TUmaMatriz = class
Matriz : Array[1..10,1..10] of String;
end;
type
minhaClass = class
FMatriz:umaMatriz;
constructor create(matriz:umaMatriz);
end;
constructor minhaClass.create(matriz: umaMatriz);
begin
Fmatriz:=matriz;
end;
Responder
Gostei + 0
01/11/2006
Marco Salles
Talvez isto resolva... Por analogia...
........
Type
TUmaMatriz = class
Matriz : Array[1..10,1..10] of String;
end;
type
minhaClass = class
FMatriz:umaMatriz;
constructor create(matriz:umaMatriz);
end;
........
constructor minhaClass.create(matriz: umaMatriz);
begin
Fmatriz:=matriz;
end;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)