================================================

Naming Conventions

One of the great aspects of using a Drag and Drop
editor is the ability to avoid having to deal with
extensive data bases with many components that are
often hard to identify or remember. In addition to
the convenience of simply selecting an element with
your mouse, many components can be identified by
name. Whenever you create a new Page, Object or
component, IMS will automatically create a unique
name for it. Pages are named "Page1", "Page2",
"Page3" etc. Objects are also named in sequence
from "Obj1". Other naming conventions are "Geo1"
for Geometry Components, "Shade1", for Shading
components, "Sound1" for Sound Components, "Act1"
for Action components and "Evt1" for Event/Behavior
components.

If you are new to using an IMS application, you may
be wondering how to distinguish between Objects
"Obj68" and "Obj75". It's simple, with an Object
selected; change the name in the edit box to
something more descriptive. Instead of "Obj68"
change the name to "RedCar" if that is what the
Object is a picture of. Objects and components can
contain up to 10 characters in their name. If you
attempt to enter a name that is already in use, the
program will warn you to change it to something
unique.

Using a descriptive name can be particularly useful
when you need to select an Object or Component in a
Dialog. Although your IMS application will usually
display a picture of the selected item, if you have
20 rectangles named Obj10 through Obj30, this may
not be helpful. Having a unique name will enable
you to select the correct component with little
trouble.

In addition to identifying an Object in a dialog,
using a unique descriptive name can help you to
quickly find an Object or component in your
published HTML files. This can be helpful if an
Object is not being displayed as expected and you
wish to examine the code. Your "RedCar" Object can
be found by searching for "ORedCar" in the HTML
source file. Similarly, geometry components will
use the name you set in the project with a "G"
prefix. By pre-appending an "O" to Objects and a
"G" to Geometry you can use the same name for
Objects and Components in your project without
conflict and still distinguish between each in the
HTML file.

If you have been wondering how to create web pages
with names that are a little more descriptive than
"Page1.htm", "Page2.htm", "Page3.htm" etc., simply
change the name in the Page Edit box. Unlike
Objects and components, pages can use up to 48
characters. In case you do not know, the entry page
to you web site is usually called "
index.htm",
"
default.htm" or something similar. This is the
page that will be displayed when someone types in
the URL of your site without a file name. Check
with your service provider to find the name of this
page if you do not already know it. If the default
entry page is "
index.htm" for example, change the
name of the main page in your IMS project to
"index". In IMS Web Engine and Web Spinner you can
also change the extension from ".
htm" to ".html" in
the Page Editor. Although this is not necessary,
Unix system will usually look for ".html" files
before ".
htm" equivalent.

You should take care when naming an Object or Page
not to use none standard characters. Characters
such as "*&^%$#@!" or a space, can cause problems
that generate an error or an unexpected result in a
Browser. The latest IMS versions include a filter
to remove these problematic characters. If you name
your Object "#My Car" for example but discover that
the program will only list it as "
MyCar" you can
blame it on the filter. This is preferable however,
to getting strange errors on your Web Page that are
difficult to identify.


================================================
"IMS Web Tips" ISSN 1488-7088
© Copyright 2000 Virtual Mechanics
================================================

"IMS Web Tips" is a weekly news letter for all web site managers regardless of experience who are looking for detailed information on creating, maintaining and promoting their web sites.

To subscribe send a blank e-mail to join.imswebtips@list.imswebtips.com  or
visit the IMS Web Tips home page for subscription information and a list of past articles.

---------------------------------------------------------------------

If you like the contents of this newsletter, please recommend it to a friend. Not only will you help us to continue to provide you with useful and informative articles, you could also win $10,000. Click here for details.

Click here for a free WYSIWYG pixel precision HTML editor.
Join the IMS Web Tips weekly newsletter
Email: Name:

Please recommend us to a friend.
Home         Archive by Date         Archive by Topic        Virtual Mechanics