Nomenclature: Difference between revisions
From Free Pascal wiki
Jump to navigationJump to search
(initial text) |
(tcontrol notifications) |
||
Line 5: | Line 5: | ||
* method names "DoFoo" are reserved for calling event "OnFoo" | * method names "DoFoo" are reserved for calling event "OnFoo" | ||
* suggestion: use "UpdateFoo" instead of "DoSetFoo" to update certain characteristics or to make some assertion valid | * suggestion: use "UpdateFoo" instead of "DoSetFoo" to update certain characteristics or to make some assertion valid | ||
* notifications for TControl decendants should be named CNxxx |
Revision as of 10:51, 16 November 2005
- properties should not start with a verb, but with a noun
- methods should start with a verb
- method names "GetFoo" are reserved for property "Foo" getters
- method names "SetFoo" are reserved for property "Foo" setters
- method names "DoFoo" are reserved for calling event "OnFoo"
- suggestion: use "UpdateFoo" instead of "DoSetFoo" to update certain characteristics or to make some assertion valid
- notifications for TControl decendants should be named CNxxx