I got an idea for a component I'm building, and don't know if it's possible. The goal is to make the component recognize when an external boolean (one from not inside the component) changes. Specifically, I want to tell this component to monitor the value of the Active property of a server socket component. If at any time this value is changed from True to False, I want my component to recognize it and respond accordingly. The variable specified can be of any other component. I know I'll probably have to make a timer which is continually checking this value, but how to keep record of what value to read? It should be something like this...
JD Solutions
Code:
procedure TMySocket.SetBoolToMonitor(var Variable: Bool);
begin
//"Variable" represents the Boolean property to be monitored
//I don't want to copy the value, I want to keep a pointer reference to this variable.
end;
JD Solutions