Ferreteria/v2/usage/forms

From Woozle Writes Code
< Ferreteria‎ | v2‎ | usage
Revision as of 19:54, 13 February 2015 by htyp>Woozle (saving work)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Forms in Ferreteria consist of several sets of classes that work together:

  • control classes render editable (and eventually non-editable) data fields
  • field classes handle translating values between internal storage and on-disk storage (database)

Code file: Template:Ferreteria/code

Classes:

  • clsFields: a collection of clsField objects
    • clsField: a generic (unspecialized) field, suitable for plain text
      • clsFieldTime: field for storing date/time
      • clsFieldNum: field for storing numeric (int or float) data
      • clsFieldBool: field for storing a BIT-type boolean field (which, oddly, is returned as a single character instead of numeric)
        • should be renamed clsFieldBool_bit
      • clsFieldBool_Int: field for storing a boolean value stored as an integer
  • clsCtrls: a collection of clsCtrl form controls