CREATING YOUR OWN TAGS

What do you do when LNC doesn't address a particular object naming need? First, contact us and let us know why, so that we can improve the style for the benefit of all users. Second, consider whether what you're trying to do is covered by the style in some other way. Suppose that your development team calls tables that link two other tables in a many-to-many relationship linking tables, and you want to create a new table tag tlnk as a result. On examination of all table tags, however, you find that trel already exists, defined as “Table (many-to-many relation),” which is the correct tag for what you need. Even though the nomenclature isn't exactly what you require, it's better to use an existing tag than create another one.

Finally, when other options are exhausted, you can create a custom tag to address your need. When you create a custom tag, the following should be your guidelines:

  • Don't redefine an existing tag. No matter how badly you really want the three- or four-character combination for your own purpose, never reuse a defined tag.

  • Don't change the rule for tags. Stay within the three- to four-character range followed by LNC.

  • Use the conventions in existing tags as your guide for the new one. For example, all table tags start with t, all query tags with q, and so forth. Any new tags you make for these objects should begin with the correct letter. See Table D.17 for guidelines on standard tag components.

Table D.17. Some Standard Tag Components
Item Segment Example Location
Bar br pbr Anywhere
Data/databound d dout Leading
Database db dbe Leading
Form f fdlg Leading
Macro m mmnu Leading
MAPI mp mpm Leading
Module b bas Leading
Query q qsel Leading
Report r rdet Leading
Set st rst Anywhere
Table t tdf Leading
View vw lvw Anywhere

Note

Some examples in Table D.17 are from the Office version of LNC. Tag components that can be easily inferred from the preceding tags aren't listed in the table—for example, the component fox for FoxPro can be inferred from the tags tfox and dfox.


When creating a new tag, it should be mnemonic enough to uniquely shorten the word it represents and should use only characters from the root word or a generally accepted shorthand.

To create tags for object variables pointing to ActiveX server applications, start with the three-character DOS file extension for the files created by the server application, if the DOS file extension is unique and applicable. If the DOS extension is not unique, create a meaningful abbreviation of the application name. Add to the three-character abbreviation three characters for the actual object that serves as the entry point for the application, such as Basic in Word.Basic.

For example, to create a tag for Automation with Shapeware's Visio program, which is an OLE server, use either vsd (the data file extension) or vis (a better mnemonic for Visio) as the basis for the tag. Next, add a for Application because the entry point to Visio's automation engine is a call to "Visio.Application". Thus, the tag and its use in variable declarations would look like this:

Dim ovisa As Object
Dim ovisaDoc As Object
Set ovisa = CreateObject("Visio.Application")
Set ovisaDoc = ovisa.Documents.Open("C:VISIOHOUSE.VSD")

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.151.144