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 ‘4D v11’
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 »
4D record locked in read only mode
Posted in 4D, tagged 4D v11, locked record, read only mode on March 2, 2011 | Leave a Comment »
Was doing a bit of 4D v11 programming when I discovered this conundrum. I found it to be confusing, but maybe it makes perfect sense to everyone else. When showing a record to a user with the table in read only mode, 4D returns True for LOCKED even though LOCKED ATTRIBUTES returns nothing. This occurs [...]