Thor TWEeT #13: Custom Keyword List

VFP is not a case-sensitive language and it provides little assistance in maintaining the case of names of “things” – fields, variables, properties, methods, function, procedures, and so on. The list of features provided to assist in keeping names to always appear with the same case is short and incomplete:

  • There is a list of VFP reserved words, used by Beautify and auto-expansion of Intellisense.
  • Beautify can change the case of all user-defined words in a code window to match the first occurrence.
  • _MemberData can be used so that properties and methods in a VCX or SCX can be mixed case.

Custom Keyword List provides a mechanism by which you can create and maintain your own list of keywords (of mixed case) and have these keywords appear in your code exactly as they appear in the list.  The words in the Custom Keyword List may be names of fields, variables, properties, methods, function, procedures, and so on.

For example, the image below shows the list of fields for a table as provided by IntellisenseX. Note that most of field names have one or more uppercase characters inside the name.

SNAGHTML1a2d4c4

There are four parts to the Custom Keyword List:

  • The Custom Keyword table (a table with a single field!)
  • New Thor tools to create entries in the table
  • Modifications to existing Thor tools to automatically used entries in the table
  • A new Thor tool to apply the entries in the table to all the names in an entire code window.

Tools to create and manage the Custom Keyword table

Last edited Jan 17, 2014 at 3:14 AM by JimRNelson, version 6

Comments

No comments yet.