troubleshooting Question

Referencing an object

Avatar of db2trade
db2trade asked on
Delphi
5 Comments1 Solution191 ViewsLast Modified:
Hi,

How can I refer or copy the address of an object?

For example:

I want to create a UNIT to write/display logging.

Before I use the UNIT, I would initialize it like this:

     init_unit (mm: TMemo);

From main application, if I call:

    init_unit ( nil );

Then, the logging will be written to a TStrings (internal variable of the unit).

If I call:

   init_unit ( mymemo );    // mymemo is TMemo in the main application

Then, the logging will be written to the TStrings and "mymemo" as well.

But I call the log writting with only 1 argument :

   WriteLog ( s: string );

Is this possible?

If yes, how ? :)

Thanks.

WriteLog('Hello world');
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros