Why is it bad practice to call an eventhandler from code?
It’s a question of how your program is organized. In the scenario you’ve described, the menu item’s behavior will be defined in terms of the button’s: procedure TJbForm.MenuItem1Click(Sender: TObject); begin // Three different ways to write this, with subtly different // ways to interpret it: Button1Click(Sender); // 1. “Call some other function. The name suggests … Read more