akurat do tego juz sam doSZEDŁem:
unit NumericalMethods;
interface
uses
SysUtils, Classes, Math;
type
TVector = array of double;
TNumericalMethods=class(TComponent)
private
{ Private declarations }
Fmatrix :TVector;
FText :String;
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property A_matrix : TVector read Fmatrix write Fmatrix;
property Text: String read FText write FText;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Standard', [TNumericalMethods]);
end;
end.
W object inspectorze widzi Text i wszystko sie poprawnie odbywa w projekcie do ktorego wrzucilem komponent numericalmethods. Robie sobie przypisanie Numericalmethod1.text:='aaa' potem po nacisnieciu buttona form1.caption:=numericalmethod1.text i wszystko gra.
Zdefiniowalem typ w programie
private
{ Private declarations }
public
{ Public declarations }
end;
type
TMatrix=array of array of double;
TVector=array of double;
potem klikam na buttona:
procedure TForm1.Button1Click(Sender: TObject);
begin
SetLength(matrix,8); //matrix jest Tvector
for i:=low(matrix) to high(matrix) do matrix[i]:=i+0.01;
end;
i probuje przypisac do komponentu Numericalmethods1 wlasnie tablice matrix
Numericalmethods1.A_matrix:=matrix; i wyskakuje incompatible types
czemu?? [???]
wewnatrz komponentu chce operowac na tej macierzy przypisanej do numericalmethods.A_matrix i np tworzyc jej wyznacznik