Docs for calcuated fields? HELP!

I've spent hours looking for any documentation on using calculated fields, and I cannot find any! Could someone please point me in the right direction, or if there isn't give a brief primer (I won't need much, just how to get started).
I was expecting something like this.
field.ini
atable.php
Where did I go wrong?
I was expecting something like this.
field.ini
- Code: Select all
[CALCFIELD]
widget:type = calc
widget:name = mycalcfield
atable.php
- Code: Select all
class tables_mytable ...
function field_CALCFIELD(&$record) {
return 'the calculated value';
}
Where did I go wrong?