BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linked components

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing
View previous topic :: View next topic  
Author Message
KnightCoder
Guest





PostPosted: Wed Apr 13, 2005 7:28 pm    Post subject: Linked components Reply with quote



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





PostPosted: Thu Apr 14, 2005 2:49 pm    Post subject: Re: Linked components Reply with quote




"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





PostPosted: Fri Apr 15, 2005 9:21 am    Post subject: Re: Linked components Reply with quote



Thanks, I tried the Notification method of the client and it seems to
work.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.components.writing All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.