Board index » delphi » creating objects at runtime

creating objects at runtime

I would like to be able to dynamically create instances of objects at
runtime and have the ability to reference them later on in the program.  I
need to create many instances of the same object and have the ability to
reference them each individually to be able to apply any modifications to
them.  I don't want to have to declare several instances at design time if I
don't have to.  FYI the object is Graphics Server OCX component.

Please Help
Thanks
Greg

 

Re:creating objects at runtime


Quote
"Greg keleshian" <GREgory.KELESH...@SAIC.COM> wrote in message

news:3bcdd7a9_2@dnews...

Quote
> I would like to be able to dynamically create instances of objects at
> runtime and have the ability to reference them later on in the program.  I
> need to create many instances of the same object and have the ability to
> reference them each individually to be able to apply any modifications to
> them.  I don't want to have to declare several instances at design time if
I
> don't have to.  FYI the object is Graphics Server OCX component.

You can use a TList and add each created instance to it.

Woody

Re:creating objects at runtime


I am not sure I know how.  I have never used a TList before.  Can anyone
tell me more?
Quote
"Woody" <woody....@ih2000.net> wrote in message news:3bcde315$1_1@dnews...
> "Greg keleshian" <GREgory.KELESH...@SAIC.COM> wrote in message
> news:3bcdd7a9_2@dnews...
> > I would like to be able to dynamically create instances of objects at
> > runtime and have the ability to reference them later on in the program.
I
> > need to create many instances of the same object and have the ability to
> > reference them each individually to be able to apply any modifications
to
> > them.  I don't want to have to declare several instances at design time
if
> I
> > don't have to.  FYI the object is Graphics Server OCX component.

> You can use a TList and add each created instance to it.

> Woody

Other Threads