954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to pass an event up to a parent class

Hi All

I've just been learning about events in delphi. I'm writing a program to communicate with a serial device that reads pressure data. Currently the program has been written with a separate thread to read the data, and when a complete data string is found, an event is called with the results. The current architecture is as below (excuse the drawing).

---------------------------
	        FmMainForm
	
	---------------------------
                               |
                               |
	---------------------------
	      Unit_Pressure

	---------------------------
                        /              \
                      /                 \
                    /                     \
       -------------------	      -------------------	
       Pressure Meter	      Logging Thread

       --------------------      ---------------------

A copy of the pressure meter object is passed to the Logging Thead object so that it can log. I am able to create an event that Unit_Pressure picks up, but I was wondering, is it possible to pass this event to the main form? Any tips or advice would be greatly appreciated!

Cheers

Cameron

CanYouHandstand
Light Poster
27 posts since Nov 2009
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: