Why We Need to have Control over CodeGen
Thursday, August 4th, 2011Have you ever wished that when you double clicked an event handler that the method generated by the IDE had some comments regarding the arguments passed so you didn’t have to consult the third party vendor’s help?
What about a simple TAction.OnUpdate handler, have you ever wondered why Delphi doesn’t inject the following code?
(Sender as TAction).Enabled := ^
or since it knows the component whose handler it’s creating (in this case let’s assume it’s named actTakeAction):
actTakeAction.Enabled := ^
BTW, the ^ would be the position were the cursor would be left. The choice as to what code was generated could be a code style preference setting.
It’s this kind of polish you might expect if EMB practices dogfooding, or CANI (Constant and Never Ending Improvement) - QC97158.