I noticed a reference to wanting tutorials and YouTube channel. Let me know what you are looking for and I can create a video for it next
Wow that would be really cool
👍
For example, you can show the interaction between TEdit and TLabel, where TEdit will be observed, and TLabel will be the observer,
and every time TEdit.Text is changed, TLabel will react to this and change its TLabel.Caption value to TEdit.Text value
Of course, this can be done via the TEdit change event, but most beginners like me already know and understand this method
because 99% of Free Pascal lessons show the logic of starting a procedure via basic standard events.
By the way, thinking about the observer method, I came up with a trick that does not require an observer or an explicit start of a cycle
in the procedure in order to find the desired object to apply changes to it from the UI controller
The essence of the trick is that an object that wants to bind its parameters to some Spin controller, when clicked on, transfers its name to the "capture" parameter of the TPanel,
which is the parent of this Spin controller, and when this Spin controller triggers a change event, it can find the target object by name that is written to the "capture" parameter
of the parent Panel and apply any possible actions to it
Here is a very simple working example
procedure TForm1.SpinEdit1Change(Sender: TObject);
var
TargetObjName: String;
TargetObj: TControl;
begin
// Get the name of the target object
TargetObjName:= TSpinEdit(Sender).Parent.Caption; // Here the target object transfers its name when the user selects it
TargetObj:= FindChildControl(TargetObjName); // Find the target object by name
TargetObj.Left:= TSpinEdit(Sender).Value; // Apply the change to the target object
end;