Skip to content

construct xt Config using several functions #2

@MikeBadescu

Description

@MikeBadescu
  • setDefaultConfig() to create $.default
    • first arg: xt_lst, must be present
    • second argument ...; augments if NULL from .XT$.default
      • for now, populate .XT$.default based on onetable
    • modifies $.default if present, adds $.default if missing in xt_lst
  • setOptionsConfig() to create $.options
    • first arg: xt_lst, must be present
    • second argument ...; augments if NULL from .XT$.options
      • for now, populate .XT$.options based on onetable
    • modifies $.options if present, adds $.options if missing in xt_lst
  • initConfig()
    • takes no arguments
    • returns an xt list (xl_lst) with only two fields: .default and .options
    • calls setDefaultConfig() and setOptionsConfig() w/o arguments
  • setColConfig() to update a column configuration
    • first arg is xt_lst, must be present
    • second argument ...; complains if it finds a named argument not in $.default
  • checkConfig(xt, allow_mode = FALSE) to check an xt Config (a list from xt_lst)
    • all fields starting with . must be recognized (these are allowed fields, listed in .XT)
    • there should be only one .default and .options (multiple other . names allowed)
    • dot fields must have col_name == NULL
    • names in xt list must match col_name for all the other fields (non dot fields, user columns)
    • non dot names must be unique and contain a-z A-Z 0-9 _ (and no spaces)
    • class, ui_name must be present (for all the not dot fields, NA not accepted)
    • widget, if present, must be either it's name (a string) or a list with the first argument name
      • the name must be on the allowed list in .XT
    • there should be no mode names (dt, edit, add) within col config unless allow_mode = TRUE

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions