Jesus Reyes wrote:
 --- [EMAIL PROTECTED] escribió:

Hi!

I am just testing TArray unit.
I assume this must have worked.
I copied parts of the program from grid.pas where I guess it
works..
Any ideas?
I get an error
project1.lpr(27,22) Error: Incompatible types: got "<address of procedure(TObject, LongInt, LongInt,var Pointer);Register>" expected "<procedure variable type of procedure(TObject, LongInt, LongInt,var Pointer) of object;Register>"
which refers to this row:FCols.OnDestroyItem:[EMAIL PROTECTED];

Thanks..



Márton Papp


This is missing

{$mode objfpc}

and then
OnDestroyItem it's supposed to be a method not a standalone
procedure.

Jesus Reyes A.

Ok, I got it.
Thanks..
Ok, I finished the documentation of TArray.

Márton Papp

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { add your units here },strings,DynamicArray;
procedure doDestroyItem(Sender: Tobject; Col,Row: Integer;
  var Item: Pointer);
begin
  strdispose(Item);
end;

{procedure doNewitem(Sender: Tobject; Col,Row:Integer;
  var Item: Pointer);
begin
  Item:=strnew(Item);
end;  }

var FCols: Tarray;

begin
FCols:= TArray.Create;
FCols.OnDestroyItem:[EMAIL PROTECTED];
//FCols.OnNewItem:[EMAIL PROTECTED];
FCols.arr[0,0]:=StrNew('string1');
end


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives




        
        
                
___________________________________________________________ Do You Yahoo!? La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx
_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives



_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to