Clean code principle: run targeted code only once, even if multiple executions won’t ‘hurt anything’. Make sure of this in 4D by encapsulating code with a Case of targeting specific events and turn off unneeded events. This provides clarity on what code is to execute for the specified event. It also prevents code from executing [...]
Posts Tagged ‘macro’
Encapsulate form/object methods with form event case statements
Posted in 4D, tagged 4D, 4D v11, case of, clean code, form event, macro on May 3, 2011 | 1 Comment »
Use 4D header macro to identify code blocks
Posted in 4D, tagged 4D, auto-comment, automatically repaired method, clean code, corrupt, macro, method header, orphan method, structure on June 2, 2011 | Leave a Comment »
Standard installation of 4Dv11 comes with a set of macros to use in design mode. The one I find most useful is the Header macro. This macro takes my name, date time stamp, the method name and places it directly into whatever type of method I’m working in. Most analogous to function/class/package documentation blocks in [...]
Read Full Post »