[fpc-pascal]Strange error from a simple class

James Mills prologic at daisy.ods.org
Mon Jun 9 03:16:24 CEST 2003


On Sun, Jun 08, 2003 at 05:39:51PM +0200, Michael Van Canneyt wrote:
> 
> 
> On Mon, 9 Jun 2003, James Mills wrote:
> 
> > On Mon, Jun 09, 2003 at 12:57:24AM +1000, James Mills wrote:
> > > On Sun, Jun 08, 2003 at 04:43:21PM +0200, Michael Van Canneyt wrote:
> > > >
> > > >
> > > > On Sun, 8 Jun 2003, James Mills wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I get this error from a very simple class:
> > > > >
> > > > > Runtime error 216 at 0x0805A735
> > > > >   0x0805A735
> > > > >   0x080481FF  TCONFIG__PRINT,  line 29 of configclass.pas
> > > > >   0x0805BE35  main,  line 29 of forum.pas
> > > > >   0x080480B0
> > > > >
> > > > > Any ideas ?
> > > >
> > > > You should also show the forum.pas file.
> > > > The constructor Create should be in the 'public'  section of the class,
> > > Ahh I think that's where my error lies. (stupid me)
> > >
> > > cheers
> > > James
> >
> > Actually it makes no difference, so I'll attach all relevant files.
> 
> You forget to do a load statement before the print. Actually, I think
> you swapped init and load. In init you should create the class instance,
> and in load you should load whatever values are needed.

God damn it! You're right. I guess you get that runtime error when
trying to access a non-existant class in memory ?

Thank you Michael, I must have been braindead.

cheers
James

> 
> You skipped the creation step in your code.
> 
> Michael.
> 
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list