1

Topic: From a class in components (TInterfacedObject)

Greetings to all!
We have a class implementing interface, we are inherited from TInterfacedObject and it is worked only through the interface links.
Now it wanted to me to transform this class into component VCL (Delphi5) as it is better to arrive:
1 To be inherited from TComponent instead of TInterfacedObject?
2 to Make a new class - successor TComponent who will be  a jacket over an old class?

2

Re: From a class in components (TInterfacedObject)

Links wrote:

Greetings to all!
We have a class implementing interface, we are inherited from TInterfacedObject and it is worked only through the interface links.
Now it wanted to me to transform this class into component VCL (Delphi5) as it is better to arrive:
1 To be inherited from TComponent instead of TInterfacedObject?
2 to Make a new class - successor TComponent who will be  a jacket over an old class?

C different mechanisms of control it is fraught with the big troubles, especially taking into account that compiler Delfi in some cases does the latent interface links lifetime.
Therefore, generally
3. Simply to add in successor TInterfacedObject the link to a component.

3

Re: From a class in components (TInterfacedObject)

Boris wrote:

Therefore, generally
3. Simply to add in successor TInterfacedObject the link to a component.

Like as on the contrary it is necessary for it
I for 2nd variant, the concept the worker also am often applied

4

Re: From a class in components (TInterfacedObject)

kealon (Ruslan) wrote:

like as on the contrary it is necessary for it

It needs it is not necessary what to do.

kealon (Ruslan) wrote:

I for 2nd variant, the concept the worker also is often applied

And in what advantage of a component-cover in comparison with a nekomponent-cover?

5

Re: From a class in components (TInterfacedObject)

Boris wrote:

it is passed...
And in what advantage of a component-cover in comparison with a nekomponent-cover?

Knopkoklikatelej is a lot of, and so it is easier to them to use - hence so easier to sell.
For serious people it is possible to give  without this peel

6

Re: From a class in components (TInterfacedObject)

kealon (Ruslan) wrote:

Knopkoklikatelej is a lot of, and so it is easier to them to use - hence so easier to sell.

c which falls at end?

7

Re: From a class in components (TInterfacedObject)

Boris wrote:

c which falls at end?

Why it will fall?

8

Re: From a class in components (TInterfacedObject)

[quote = _ Vasilisk _] it is passed...
Why it will fall?

Because by all means there will be a situation when the component will be destroyed before the link