Title: Message
Add a property to each of the components which you set to the other component at design time. Thay way they will know about each other.
 
Stacey
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 11 November 2003 21:47
To: Multiple recipients of list delphi
Subject: [DUG]: Basic question on custom components

Hi, I'm trying to write my first custom component and have come across a problem I'm positive it's common and easy to solve - but I'm not familiar with how.

I have a form with an existing custom component on it (written in the past by someone else). The form resides in MainUnit.pas and the existing custom component resides in UVObject.pas. I've created a new component with the class residing in TableObject.pas.

From an instance of my new component (TUVTable, dropped on the form), I need to call methods of the instance of the TUVObject component on my form. In TUVTable.pas I could add a uses clause, MainUnit, and then call MainUnit.UVObject1.method - so allowing communication between the 2 component instances. This is silly as if the user of my component has named their unit something other than MainUnit, then it won't work.

How do I enable intercommunication between 2 component instances on my form?

Thanks for the help.

Cheers,

Dave

    Dave Jollie

    Developer, TOWER NZ IT

 

(: 09 368 4259

Ê: 09 306 6801

*: [EMAIL PROTECTED]

.: 46 Parnell Rd, Parnell, Auckland

Reply via email to