Object Naming Conventions

Mark Wieder mwieder at ahsoftware.net
Thu Oct 6 21:03:39 EDT 2011


Phil-

Thursday, October 6, 2011, 12:28:38 PM, you wrote:

> Here is an excellent starting point:
>      http://fourthworld.com/embassy/articles/scriptstyle.html

> Go to the "Naming Conventions" part.

In addition to what's in Richard's writeup I tend to use the following
conventions. Mostly just a carryover from other development
environments since they don't really do much, but they tend to trigger
the same neuron activity so it makes it easier for me to conceptualize
what I'm doing:

control        prefix   example
---------------------------
buttons       : "btn" : "btnSave"
radio buttons : "rdo" : "rdoOption1"
checkboxes    : "chk" : "chkShowLineNumbers"
tab buttons   : "mnu" : "mnuMainTabForm"
fields        : "fld" : "fldHandlers"
labels        : "lbl" : "lblSourceCode"
groups        : "grp" : "grpGraphicControls"

The only other rule of thumb I have is to keep object names one word
rather than having spaces in the middle. And of course, that rule,
like any other rule, was made to be broken when needed.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list