Important: The information in this document is obsolete and should not be used for new development.
Naming Conventions in MacApp Code
Code in the MacApp class library and sample applications, as well as sample code used in this book, follows certain naming conventions:
- Each distinct word in the name of a variable, constant, or routine begins with an uppercase letter (for example,
CloseAndFree
).- Names of variables and constants begin with a lowercase letter.
- Global variable identifiers begin with a lowercase
g
(gConfiguration
).- Command constants begin with a lowercase
c
(cUndo
).- Other constants begin with a lowercase
k
(kWantHScrollBar
).- Fields (also known as instance variables) of object classes begin with a lowercase
f
(fDocument
).- Fields that are static global variables begin with a lowercase
fg
(fgDragDropSession
).- Compile-time variables begin with a lowercase
q
(qDebug
).
- All method names begin with an uppercase letter (
Enable
).- Most of the classes in MacApp descend from
TObject
and begin with an uppercaseT
(for example,TApplication
). Exceptions include