 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
KnightCoder Guest
|
Posted: Wed Apr 13, 2005 7:28 pm Post subject: Linked components |
|
|
Hi,
Any body knows a way to notify a client component linked to a master
component, when this one becomes active?
Here is an example:
TServerComp=class(TComponent)
...
property Active...
...
end;
TClientComp=class(TComponent)
....
property ServerComp... //TServerComp
....
end;
I am activating the server component on a overriden loaded procedure.
At this time I would like to activate or notify the client components,
but it seems too late, because the loaded procedure of the client
component has been executed at this time.
Thanks in advance for any help.
|
|
| Back to top |
|
 |
Bruce Roberts Guest
|
Posted: Thu Apr 14, 2005 2:49 pm Post subject: Re: Linked components |
|
|
"KnightCoder" <lquental (AT) gmail (DOT) com> wrote
| Quote: | Any body knows a way to notify a client component linked to a master
component, when this one becomes active?
I am activating the server component on a overriden loaded procedure.
At this time I would like to activate or notify the client components,
but it seems too late, because the loaded procedure of the client
component has been executed at this time.
|
You might check if the Notification method gets called late enough for this.
If both server and clients must have the same Owner then the server can loop
through the Owner's Components array finding & notifying clients. Otherwise
you'll probably have to have the server maintain a client registration list.
This could be done through an override of its own Notification method.
|
|
| Back to top |
|
 |
KnightCoder Guest
|
Posted: Fri Apr 15, 2005 9:21 am Post subject: Re: Linked components |
|
|
Thanks, I tried the Notification method of the client and it seems to
work.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|