HomeSite Help

VTML Tips and Techniques

 

We're moving!

This whole site is being moved to a shiny new server - as are all my sites, in fact. Apologies for the bumpy road ahead, but at the end of that road things will become fast and smooth.

Once the site at the new server is ready, this message will automatically disappear!

Meanwhile, you can see how the move is progressing at the status page.

 
   Home | VTML section | HTML section | Bookstore
On this page:
Introduction
Sections
Index
Feedback
 
 

Introduction

Brain dump mode!

When learning to work with a new language, you acquire new ideas and skills. They soon become "just so": second nature, just the way you do things. And others learning the same new language will have to learn those same "just-so"s all over again. Once learned, they can be hard to pass on just because they've become so much second nature that they've become almost unconscious.

So while my learning experience is still fresh in my mind from chugging away at my ever growing set of visual tag editors, I'll write down as much as I can.

Not all of the items here are those little tips like where to put a space, and where not. Some are solutions to hard problems, or simple things found after a long trial and error session: in other words, Techniques rather than Tips. I hope at least some of these tips and techniques will be useful to you, either directly or by giving you ideas to try new things.

While I started writing this section as a single page I soon realized that it would become much too large since I don't just want to throw "do this" at you but also explain why things work as they do or how I found a particular solution to a problem. So I've divided this into sections, generally corresponding to to the sections in a visual tag editor source. Still, there will be plenty of cross-referencing so you can jump around easily.

I'm hoping you will all chip in with your own tips and techniques; therefore each page will have a Contributions section at the end with an email link. Please make sure you use the email link from the correct page since this will put the section in the subject of your mail.

Of course I'd also appreciate your feedback about this whole Tips and Techniques section: Something not explained clearly enough? Let me know so I can try to improve it!  to menu


 

Sections

VTML Tips and Techniques consists of the following sections, each on a separate page:

General
This page contains tips for things that don't really belong in any particular section, or techniques that involve more than one section. In the latter case, I'll put references to here from the sections it applies to.
Editorlayout section
All there is to tell about the EDITORLAYOUT section (well, all I could think of for now).
Updated 1998-04-19
Attributes section
Tips for the ATTRIBUTES section: there's more here than meets the eye in a section that can have only a single type of tag!
Updated 1999-03-20
Taglayout section
There also is a lot to tell about the TAGLAYOUT section(s); you'll find it here.
Tagdescription section
Tips for the TAGDESCRIPTION section: not much, but since each section has its own page...
Tag Chooser
The behavior of the Tag Chooser is controlled by the file MarkUpTags.vtm. There are several techniques you can apply to make the display in the tag chooser richer and make working with it a little more user-friendly. Here I'm explaining the techniques I'm using in the file that comes with the VTML Tag Definitions and HTML Tag Editors/HTML Tag Definitions; when I publish my HTML tag editors there will again be a special version of MarkUpTags.vtm with more techniques that I'll explain here.

Each (sub)section on each page will have an up arrow ( to menu ) to jump back to the local menu on that page as well as an exclamation mark (VTML Tips and Techniques) to jump back to this page.  to menu


 

Index

So you saw something here but now you can't find it back? On which page was that tip? I don't have any fancy CGI on this server so I can't offer a search function; but to help a little here's an alphabetical index of all items with short descriptions:

A case of case
How to simplify tag editor construction and maintenance by avoiding querying the OPTIONLowerCaseTags variable.
A name is not an alias
You may be forgiven for thinking that the NAME attribute in the ATTRIB tag establishes an alias for referring to the value of the control. It does something else entirely.
New 1999-03-20
Comments
You can use comments almost anywhere in a tag editor file; this item describes where you cannot use them.
Comments
The Attributes section can contain more than just ATTRIB tags: comments are also possible.
Comments
Using comments in the Taglayout section: a little trick is needed.
Display-only controls
It can sometimes be useful to just display the value of an attribute while you're editing a tag so the original value can still be seen, especially in working with tag attributes that take a list of values.
Editor or inserted tag?
This technique describes how in the Tag Chooser you make make the difference visible between a tag that's just inserted as text, and a tag that has a tag editor associated with it.
Expressions: more spaces
Where spaces can really help.
Focus
What determines which field first gets focus when a tag editor dialog is opened.
Hiding a control
Sometimes you may want to hide a control; this short introduction refers to the technique described in Was that value changed? where hiding a control is one of the elements.
Ignoring attributes
If you want some attributes to be always generated, not edited, you'll have to prevent them from being picked up by TAGDATAUnknownAttributes; here's how.
Indent
How the horizontal indent needed for vertical layout of a tag can be standardized: let the computer do the counting! Requires the implementation of the technique described in What's in a TagName?
Left and Up
How to place a control to the left of another control - or above it.
List or Combo?
Some rules of thumb for deciding between a dropdown Listbox or a dropdown Combobox.
Minimum width
What's the minimum width for a tag editor?
More about width
HomeSite determines a default width for a tag editor if you don't specify one.
Number or String?
When is a variable a number and when is it a string?
Preselecting a tab
Short introduction about calling a tag editor from the Tag Chooser with a particular tab page preselected; refers to the actual technique explained here.
Preselecting a tab
How to call up a tag editor from the Tag Chooser with a particular tab page preselected.
Scope
Not documented anywhere else: you can refer to the name of a previously defined control - but control names have scope.
Small things: spaces
Where you don't need spaces - and how that prevents unnecessary error messages when using VTML validation.
Special tags
How to call up tag editors from the Tag Chooser when the tag editor name does not correspond to a tag name.
Tabbing order
What determines the tabbing order of input fields in an tag editor dialog.
Textarea
Some quirks in the behavior of a Textarea that you ought to know about.
Two Lists
How to handle two possible sets of values for the same attribute, for instance when a browser-specific version allows more than the standard set (with a short introduction here).
Variable names
Some facts I gathered about the rules for variable names and how they influence the way expressions are interpreted.
(Vert)SpacingGap
In some tag editors you'll see only the variable SpacingGap used for controlling whitespace within a tag, in others both VertSpacingGap and SpacingGap. So what's the difference?
Was that value changed?
In order to take a decision you may want to know not just what an attribute value is but also whether that attribute value was changed from what it was before; the technique described here makes this possible.
What anchor?
Do you need an anchor? What happens when you don't specify one (or make a typo in the name).
What's in a TagName?
Standardizing the use of tag names in the Taglayout section - and why that matters.
Where's the help?
Shows what a tag editor should show when there's help information associated with it and relates the case of the disappearing Tagdescription. Why it disappeared and how it was solved is explained here.
Where's the help?
Explains what made the Tagdescription disappear from the TAG tag editor, and how the problem was solved: the beginning of a new technique.
Whitespace
Controlling whitespace written in the Taglayout section.
Whitespace gobbler
How to get around the fact that the EndTag section of the TagLayout gobbles up all white space written just before the actual end tag - and a small drawback of using that technique.

 to menu


 

Feedback

Something not clear? I can only make it better if you tell me. Found one of my usual "yping terrors"? (Even HomeSite's chellspecker can't find them all.) Let me know so I can correct it. Any other comments? Write to me!

Send your comments to: mail Comments about VTML Tips and Techniques  to menu