Home page  
Help >
Named Objects
Version 7.11
NAMED OBJECTS

Objects such as Buttons, Check Boxes, Text Objects, etc., can be named. If they are named they can be the source or target of a MOVE command, or, in the case of Buttons and Pulldown Menu Command lines, the target of a
DIM or UNDIM command. That is, objects that are named can be referred to or addressed. If they are not named, your procedure will not be able to refer to them.

The properties for any object that can be named will have the item "object name" in it. So to name an object just enter a name where it says "object name". To get the properties box for any object when you are in a definition mode, put the cursor on the object and right-click.

It's unnecessary to name very object, only name the ones that you have need to address with a MOVE, DIM, UNDIM, or SCROLL command.

Data fields on data-entry screens (otherwise known as "transfer fields," the places where Thunderbolt picks up or delivers data) are automatically known by their fieldnames so you do not need to assign a separate object name for them. In other words, for transfer fields the fieldname is the object name so a MOVE command can always address these.

Objects That Can Be Named

Objects that can be named are:
Pulldown Menu Command Lines
Procedure Text Buttons
Procedure Icon Buttons
Radio Buttons
Check Boxes
Image Objects
Icon Objects
Text Objects
Text Rectangle Objects
Scrollers
Service Fields
Transfer Fields (see note immediately above)

With the exception of Pulldown Menu Command Lines, all of the others are objects that will exist in either Screens or Dialogs. They will be part of your Screen and/or Dialog definitions.



REFERENCING NAMED OBJECTS

Once a Dialog or Screen that contains a named object is in existence, that is, is visible on your monitor, your procedure can refer to the object by name. For example, suppose you have a Text Object on a Screen and you gave it the name JACK. Then the following line in your Special Procedure:

MOVE "Any Message" TO JACK

moves your literal message to the Text Object and it would become visible on the Screen. The Text Object is the one that was dropped into your Screen definition from the tool palette, i.e.,






Text ObjectTextRectangle Object


Imageor Icon Object












You can MOVE things (including blanks) to Text Objects, but you can not MOVE things from them to a variable, so they serve handily as message areas.

You can MOVE things both ways from Service Fields, so they can serve as communication areas. Service Fields are dropped into your Screen definition from the Screen Definition Palette, i.e.,







CheckBox
ProcedureButtons RadioButtons
Service Field TransferField

And your procedures can MOVE values to and from Transfer Fields. For example:
MOVE CITY to %XX
MOVE %XX TO CITY

The first moves the content of the field named CITY to the variable %xx.
The second moves the content of the variable %xx to the field named CITY.


QUALIFIED NAMES

So what happens if you have a Dialog and three Screens all instantiated at the same time and they all have an object named JACK? The answer is that all names can be qualified by the definintion name in which they appear, and further qualified by the definintion type. A fully qualified name consists of:

deftype.defname.objectname

The values for deftype are one of: DIALOG for dialogs
MENU for switchboard menus
MENUBAR for pulldown menus
SCREEN for data entry screens

So, for example, if you had a Text Object named JACK in a screen definition named CUSTOMERS you could refer to it via its fully qualified name:

MOVE "Any message" TO SCREEN.CUSTOMERS.JACK

and the procedure that contained this line can be associated with any button or field or record in the CUSTOMERS screen or any of the other screens ordialogsthat are in existence at the same time the CUSTOMERS screen is in existence.


INTERROGATING THE "STATE" OF A RADIO BUTTON OR A CHECK BOX

By the "state" of a Radio Button we mean "Which button is pressed?"
By the "state" of a Check Box we mean "Is it checked or not?"

You can obtain these answers by refering to Objectname[state]. That is, attach the string "open bracket STATE close bracket" butted right up to the object name with no space.

For example, if you have a three-button Radio Button object that you have named PREFERENCE, then

MOVE PREFERENCE[STATE] TO %VV

the variable %VV will contain the return string associated with whatever button is pressed.

For the Check Box: Suppose you have a Check Box named MARY. Then

MOVE MARY[STATE] TO %VV

the variable %VV will contain YES if the box was checked, or NO if it was not.

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.