Submodule_MethodsCFldIdent

Type: Submodule Parent Module: ModuleCMethods

This submodule replaces notation that uses field idents with the name of the object ($name property).

Functionality

Only window classes are processed. Searches all methods for commands containing ".$objs.", followed by a 4 digit ident number (i.e. greater than 1000.), and "Hide fields", "Show fields", "Disable fields" and "Enable fields" commands that use idents.

For each such reference located:

  1. Check that the command is refering to an object on the window being processed. Ignore "$objs" notation if it is not prefixed by $cinst or $cclass.
  2. Determine the $name of the object using the $ident.
  3. If the $name is blank, log a user warning.
  4. If the $name is not blank, change the code so that it uses the $name of the object rather than the $ident.

For example. Calculate #F as $cinst.$objs.1003.$backcolor.$assign(kRed).

Might be converted to Calculate #F as $cinst.$objs.myField.$backcolor.$assign(kRed).

and Disable fields {1003}

Might be converted to Disable fields {myFieldThree}

Assumptions

  1. That object names are unique within a class.
  2. Windows do not enable/hide etc. fields on other window instances. If windows do this then this module should not be run on your library (disable this module using the converter About window.)

User Setup Required for this Module

  1. None.