In D5+, you shouldnt destroy the object inside the constructor.


----- Original Message -----
From: "Neven MacEwan" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Tuesday, 14 November 2000 15:50
Subject: Re: [DUG]: incredible and horrible. (the Code)


> Juan
>
> This should be
>
> constructor TSpIterator.Create(InitCount: Integer);
> begin
>     inherited Create;
>     if ( InitCount > 0 ) then
>     try
>        Reset(InitCount);
>     except
>        on E: EOutOfMemory do
>        MessageDlg(E.Message, mtError, [mbOk], 0);
>    end
> end;
>
> (not sure of the effect of calling free inside a constructor - but i
> wouldn't recommend it)
>
> and
>
>     RowsLeft := TSpIterator.Create(Rows); // problem starts here
>     ColsLeft := TSpIterator.Create(Cols);
>
> inside a try except
>
> HTH
> Neven
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to