What do you propose? I was thinking in raising an exception instead.

On Tue, 14 Nov 2000, Rohit Gupta wrote:
> 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"
-- 
  Juan Manuel Gomez Ramos
  Computer Science student at Havana University
  Paraglider pilot and RadioHam (CM9BPG)
  http://cubairsports.itgo.com = http://www.geocities.com/cubairsports

  email:<[EMAIL PROTECTED]>         eFax: +1-707-313-0329 (USA) 
        <[EMAIL PROTECTED]>         +44-870-125-4936 (UK)
        <[EMAIL PROTECTED]>
  ICQ:  62091995
  http://chronos.itgo.com


---------------------------------------------------------------------------
    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