settings variable names
settings variable names
What is the difference between settings variables (such as oSettings.iDisplayStart and oSettings._iDisplayStart) sometimes referred to/addressed with the underscore and other times not? Two ways to address the same variable or two different things?
This discussion has been closed.
Replies
I use the underscore to denote "private" properties, which should only really be used internally by DataTables (since Javascript doesn't have a "private" variable option). With these properties, you should generally use a method which is provided in order to get or set their value, such as oSettings.fnRecordsTotal().
It's worth noting that _iDisplayStart is an exception to this rule... You can safely use this property (at the moment!), but I think I might add a get/set method for it in the future. Also there is no oSettings.iDisplayStart property, only oSettings._iDisplayStart.
Regards,
Allan