Mains
Addendum
Command Objects
Command Line
Initialization
System Variables
TCB Menuing
TCB Data Control
TCB Messaging
TCB Web Object

TCB Workings

TCB Programs

When you look at any PC computer window, virtually everything you see is a separate object placed in the window. Every object you see has a set of attributes that control its look and behavior. A particular window also has attributes such as placement, size, font size, background, etc.

TCB programs are comprised of a set of specifications that describe the window that will appear and each object's properties. Objects used with TCB are described below. TCB processes can be contained in plain text files or database records.  The order of  object specifications in the process file doesn't matter unless they are being used with a data control or if an object is being referenced its position in the file may be important.

Most TCB objects are alive. This means that many objects can perform one or more activities depending on how the user interacts with the object. This provides enormous flexibility making it possible to create useful programs and complete systems.

Tangible Object Specifications

winspec=grafics\bkpurple1000.jpg, green, Plum, Times New Roman, 1, False, 5800, 5820, 865, 8809, grafics\TCBlogo.ico
winspec=Caption, BackColor, ForeColor, FontName, FontSize, FontBold, Height, Left, Top, Width, Icon
note: if Caption is file name then use file name as background graphic and no caption
There is only one winspec object allowed

frmspec=FrameName, wallpaper\small-globe.jpg, beige, Green, Tahoma, 8, False, 5415, 45, 30, 8559
frmspec=Name, Caption, BackColor, ForeColor, FontName, FontSize, FontBold, Height, Left, Top, Width
note: if caption is file name then use file name as background graphic and no caption
The frmspec object is not used with this version of TCB but is included for reference.

butnspec=modscreen|, ,mod,turquoise,small fonts,2,-1,80,0,0,80,ctrlbox=7|,1
butnspec=RightClick, Tip, Caption, ForeColor, FontName, FontSize, FontBold, Height, Left, Top, Width, CMD[|CMD|...], CMDStyle, Box
Note: above butnspec shows use of "textin" function sending the contents of a file to the first text box on the screen. Right-clicking causes the command string in RightClick to be executed. 399 butnspec objects are allowed in a single TCB process.

lblspec=explorer.exe|, Reports, trans,times new roman, 12, -1, turquoise, 0, 0, 300, 2500, 200, 3000
lblspec=RightClick, Caption, BackColor, FontName, FontSize, FontBold, ForeColor, FontUnderline, FontItalic, Height, Left, Top, Width, FieldName, Box
Note: if the name property contains a command line and the label is double-clicked, the command(s) is executed. Right-clicking causes the command string in RightClick to be executed. 399 lblspec objects are allowed in a single TCB process.

imgspec=ideButton| notepad.exe prcs\real.prc|,Click - rerun - right-click edit , 350,8400,300,350,tcb.exe prcs\real.prc|quit=|,1,Snapshot,,
imgspec=RightClick, Tip , Height, Left, Top, Width, CMD[|CMD|...]|, CMDStyle, Image, Box
Image objects can be used to display graphics. TCB also uses them as picture buttons, just click the picture. Right-clicking causes the command string in RightClick to be executed. 399 imgspec objects are allowed in a single TCB process.

txtspec=mem0in=memonly|textin=1;open|,Right-click to load a file double-click to save to a file. , yellow,black, Courier, 9, -1, 0, 0, 2800, 400, 500, 4730, 0, 0, -1, 2, , *,textout=1;save|, 1, Check Daily reports.
txtspec=RightClick, Tip, BackColor, ForeColor, FontName, FontSize, FontBold, FontUnderline, FontItalic, Height, Left, Top, Width, MaxLength, Locked, Multiline, ScrollBars, PasswordChar, EditWord, CMD, CMDStyle, TexT FieldName, Box
Note: when a text box is double-clicked, the command line in the CMD property is executed. Right-clicking causes the command string in RightClick to be executed. 399 txtspec objects are allowed in a single TCB process.

combspec=cmd=4;|,Light Grey,Bla ck,tahoma,8, -1,0,1800,600,300,2000,cmd=10;|,1, Press Enter to create a process from the table shown
combspec=Name, Backcolor, Forecolor, Fontname, Fontsize, Fontbold, Fontitalic, Height, Left, Top, Width, Command, Type, Tip, Box
The drop-down box is a data container that contains a dropdown list of datas. Pressing Enter executes the command line in the CMD property. Tab key causes the command string in Name to be executed. 399 drop-down box objects are allowed in a single TCB process.

listbspec=1|listone,WHITE,teal,tahoma,10,-1 ,0,0,0, 1230,3600, 1680,2600,0,explorer.exe,notepad.exe,calc.exe,watsa yo,,
listbspec=Name ,BackColor ,ForeColor ,FontName ,FontSize ,FontBold ,FontItalic ,FontUnderline ,FontStrike ,Height ,Left ,Top ,Width ,Appearance ,SLClick ,SRClick ,RClick ,Tip ,Box
The list box is a data container that contains a list of datas. Shift-Left-clicking causes the command string in SLClick to be executed. Shift-right-clicking causes the command string in SRClick to be executed. Right-clicking causes the command string in RClick to be executed. 399 list box objects are allowed in a single TCB process.

slidespec=1|test transparency|,280,100,300,2000,1, 255, 1, 20, 1, 255,wintrans=mem0|,change value, ,
slidespec=Name, Height, Left, Top, Width, Orient, Max, Min, LargeChange, SmallChange, Value, OnChange, Tip, Box
The slider is an object that can be set to return values between Min and MAX when the slide moves. 399 slider objects are allowed in a single TCB process.

optionspec=1|optionone,Option One,darksalmon,teal,impact,14,0,0,0,0,500,100,3700,1600,0,0,zmsgbox=TEsting tmessage;1;Timed;6.8;2000;2000;|msgbox=Option Shift left-click|,msgbox=Option Shift Right-click|,msgbox=Option Right-click|,I am an Option Button,,
optionspec=Name, BackColor, ForeColor, FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrike, Height, Left, Top, Width, Appearance, Value, SLClick, SRClick, RClick, Tip, Box
The option button is an object that is set 0 if not selected and -1 if selected. Shift-Left-clicking causes the command string in SLClick to be executed. Shift-right-clicking causes the command string in SRClick to be executed. Right-clicking causes the command string in RClick to be executed. 399 option button objects are allowed in a single TCB process.

checkspec1|checkone,Message,teal,yellow,impact,14,14,0,0,0, 500,100,4400,1600,0,0,popscreen=checkbox;1;1|,msgbox=CheckBox Shift Right-click|,msgbox=CheckBox Right-click|,I am a CheckBox,,
checkspec=Name, Caption, BackColor, ForeColor, FontName, FontSize, FontBold, FontItalic, FontUnderline, FontStrike, Height, Left, Top, Width, Appearance, Value, SLClick, SRClick, RClick, Tip, Box
The check box is an object that can is set 0 if not checked and 1 if selected. Shift-Left-clicking causes the command string in SLClick to be executed. Shift-right-clicking causes the command string in SRClick to be executed. Right-clicking causes the command string in RClick to be executed. 399 check box objects are allowed in a single TCB process.

picspec=1|picplay=1;grafics\clock.avi|, gray, red, tahoma, 16, -1, 0, 0, 2600,5600,500,3000,,mem0in=memonly|promptin=Grafic files@@*.avi@@*.mov@@*.mpg@@*.mp4@@|open=|mvarin=1;@@mem0|picplay=1;mem1|, notepad.exe|,Double-click for Explorer - right-click to play video,,
picspec=name,back,fore,fontname,fontsize,fontbold,fontunder,fontiti,height,left,top,width,pic,cmd1,cmd2,tip
Picture boxes can contain text and pictures as well as run videos. Picture boxes are also used as containers. The "Box" property in all tangible objects except winspec and frmspec specifies the number of a picture box that is a container for the object. When a picture box is double-clicked, the command line in the cmd1 property is executed. Right-clicking causes the command string in cmd2 to be executed. 399 picspec objects are allowed in a single TCB process.

treespec=treeview,yellow,black,2400,505,800,2400,blue,green,22,8,10,PIC,1.2,-1,notepad.exe,calc.exe,explorer.exe,Right-click to view document,,
treespec=Name, BackColor, ForeColor, Height, Left, Top, Width, BackHighColor, ForeHighColor, IconSize, FontSize, Indent, Speed, Sort, SLClick, SRClick, RClick, Tip, Width, Box
Note: the treespec is a data container that displays data in hierarchical tree diagrams. Shift-Left-clicking causes the command string in SLClick to be executed. Shift-right-clicking causes the command string in SRClick to be executed. Right-clicking causes the command string in RClick to be executed. 399 treespec objects are allowed in a single TCB process.

gridspec=TestGrid|gridin=1;data\gridtest.dat|, green, Black,tahoma,-1,0,0, 2000,400,3400,4730,green, black,&H00C0C0FF&,&H0000FF00&,&H00BBFDFD&, &H00B5F7C6&, &H00C000C0&,0, MsgBox=did grid right-click|gridin=1;data\gridtest.dat|,notepad.exe|,Shift-rightclick to load grid double-click for Notepad ,,
gridspec=RClick, BackColor, ForeColor, FontName, FontBold, FontItalic, FontUnderline, Height, Left, Top, Width; "," + BackColorContainer, BackColorFixed "," + BackColorSelected, ForeColorFixed, GridLineColor, GridColorFixed, Edit, ColClick, dClick, Tip, box
Note: the gridspec is a data container. Right-clicking causes the command string in RClick to be executed. Double-clicking causes the command string in dClick to be executed. 399 gridspec objects are allowed in a single TCB process.

webspec=docs\aboutthis.htm,cornsilk, 3015,600,600,4125,grafics\bkgold1000.jpg, line,tahoma,10,-1,url,cornsilk,teal,tahoma,9,0,title,turquoise,ms sans serif,8,0,webrest=1|,websize=1;9000;10000|webpos=1;600;600|,right-click to expand shift-left-click to retore,0
webspec=[big=]|name,BackColor,height,left,top,width,pic, linename,lineFontName,lineFontSize,lineFontBold,uname,uBackColor,urlForeColor,urlFontName,urlFontSize,urlFontBold,titlename,titleForeColor,titleFontName,titleFontSize,titleFontBold,cmd1,cmd2,tip,box
Note: the webspec is the TCB Web Object control. Right-clicking causes the command string in cmd1 to be executed.Shift-left-clicking causes the command string in cmd2 to be executed. 99 gridspec objects are allowed in a single TCB process. See Web Objects in the Addendum.

In-Tangible Object Specifications

tdatspec=Ctrl3,admin.db3,journal,rsid,name,1,1,4,12,1,1,select * from journal
tdatspec=name,datsetspec,recset,recIdFld,recKeyFld,textstart,labelstart,norows,nocols,currentrec,recKeyFldNo,query
Note: the TCB data control can be used to load and edit data base records and fill data objects automatically
399 tdatspec objects are allowed in a single TCB process.

datespec=midnight Blue,green,MS Serif,9,0,
datespec=backcolor,forecolor,fontname,fontsize,fontbold,
The TCB date and time control is always available. It passes date and time information in various formats to processes.
Only 1 datespec object is allowed or required in a single TCB process.

cmdspec=notepad.exe|explorer.exe
cmdspec=[name]|command string|command string|......
Note: the library command specification loads the cmdspec to a library of commands. They are referenced sequentially by the ordinal number of the loaded library command. Commands are executed by ordinal number or a capitalized name as the first parameter of the cmdspec. These command strings execute faster than executing the same string directly from a button or image.

Library commands are called by "cmd=[nn|name]", where n is the ordinal number of a cmdspec and name is a first capitalized. Multiple cmdspec= may share the same name. In that case when the cmdspec name is invoked, all the cmdspecs with that name are executed in ordinal sequence.
399 cmdspec objects are allowed in a single TCB process.

prespec=xbutn.exe cmd\tcbAlpha1.xbi
prespec=command string|command string|...
Note: prespec= commands are executed sequentially after the process is loaded but before the window is displayed (may change).
99 prespec objects are allowed in a single TCB process.

postspec=login.exe
postspec=command string|command string|...
Note: postspec= commands are executed sequentially when the process is shutting down just before the process exits
99 postspec objects are allowed in a single TCB process.

Addendum

TCB Web Object

The TCB Web Object is a HTML and PDF document reader control based on the standard Microsoft Internet control. The control consists of a title/status bar at the top of the object view port. Beneath it is the URL or Location bar. In the center is Internet control and beneath it is a button that toggles on-line/off-line mode.

The Name attribute in the object specification can be a multi-valued data item. Normally, it contains the URL of a document to be loaded when the control is loaded. If the text big=| is found in the beginning of the Name attribute, then the Internet control occupies all the space in the control except for a small border bottom and right. This lets the Web Object function as a simple internal document viewer.

Up to 99 Web Objects can be specified in a single TCB program. The TCB program Web Juke Box (prcs\zwebjuke.prc) provides and example of using multiple browser windows in a single process. This TCB program has its own database for storing email, downloads, and bookmarks. The Web Juke Box has an integrated pop-up Send Mail control panel that let's you browse/edit and/or send emails with a single click. Send Mail integrates the TCB email.exe program.

The pop-up Bookmarks panel lets the user select a bookmark and load it into the default web object. It also provides one-stop maintenance of your bookmarks. The pop-up Download panel lets the user manage downloads and send a download with a single click. Download integrates the TCB download.exe program.

The Jukebox Control panel has a box for executing TCB commands and SQL queries. It also allows for loading and saving of files. This kind of control panel is extremely useful for trying out command strings and queries. Web Objects can be loaded directly from commands executed in the Control box.

The last panel in Jukebox is the Messaging Control. It lets the user setup client/server relationships with another program or process. It also has a separate send only capability that sends text directly to a target process. To the right of the "Messaging Control" label are 3 labels, "Setup", "Send", and "Close." Beneath each of those labels is a button. The Setup button sets the program to act as client (slave) if clicked or act as a server (master) if right-clicked. The relationship is initiated by a process broadcasting its ID. This what happens when you click Setup.

The Send button delivers the content of the Jukebox Control panel text box to the client program. When the client program receives the data from the server, it attempts to executed each line in the data. The Close button terminates the connection. either client or server can terminate the link.

There are four buttons under the Intermessaging section of Messaging Control. The top-left button will attempt to run any command line in the Jukebox Control text box and attach to it. The top-right button sends any data in the Jukebox Control text box to the attached program. The bottom-left button lets the user select another program title to attach to. The bottom-right button terminates, "kills," the attached program.

For this messaging to work, the attached program must have focus before you send data. There must be an object that can receive text data visible and in focus on the attached program window.

The Process Specification

In its simplest incarnation a TCB program or process is just an ordinary text file containing lines of text in fixed formats. There is 1 line in the file for each object to be used in the process. Some objects are visible and "tangible"  that can be seen and acted on . Some objects are intangible and some objects are command objects .

The TCB Command Object

TCB Processes can contain 3 types of command object specifications:

  1. prespec= defines a command line consisting of functions to be executed before the window is activated. Multiple functions are separated by the bar "|" character. There can be 199 prespecs= in a program specification.
  2. cmdspec= defines a command line consisting of functions to be stored for later use. Using a library command is the recommended way of executing long command/function strings. A cmdspec can be named and referenced by name.

    Example:
    	cmdspec=TWO|explorer.exe|
    	cmdspec=TWO|notepad.exe|
    In the example above there are two cmdspecs each named the same. When the function, cmd=TWO|, is executed in a TCB program, every cmdspec with the name TWO will be executed in the sequence they appear in the program file. There can be 199 cmdspecs= in a program specification.
  3. postspec= defines a command line consisting of functions to be executed just before the process exits. There can be 199 postspecs= in a program specification.

The TCB Command Line

The TCB command line accepts several parameters. The command line has the below format:
     TCB.exe [delim][process file name|database record][delim][mem 0][delim][mem 1][delim]...[mem 9]
     Where: (optional) delimiter is any one of ,;/\!@#$%&^*()? and, if present, is the delimiter used to break up the command line.
     Where: (required) process file name is the path\file-name of a process
     Where: (required) delim is the chosen delimiter. The default delimiter string is ",;/".
     Where: (required) mem0...mem9 fills the system variables mem0 through mem9 with values.
     Example: TCB.exe prcs\loginAS400.prc,grafics\deskadmin.prc.jpg,grafics\yesmaster.wav

However, the most common use is simply: tcb.exe [TCB program location\name].
Example: tcb.exe prcs\processgen.prc.

To retrieve a process from a database record the calling syntax is:
    ~DB~[database file]~[table name]~[name of name column]
    Where: [database file] is the full or relative path to a database library file
    Where: ~ is a separator for the entries
    Where: [table name] is the name of a table in the database
    Where: [name of name column] is a value in the name column of the table

The Initialization File

When many TCB programs start up it looks for the file tcbinit.txt in the application folder. If it exists it is read in and attributes for that program are set from the paramters in the file. Each line in the file is a different attribute to be changed. Those lines have the general format:
 attribute tag=value
Example file:

browser=xbrowser.exe 		sets default general document browser
hbrowser=xbrowser.exe 			sets default HTML document browser
pbrowser=xbrowser.exe 			sets default PDF document browser
factoryback=grafics\bkred1000.jpg 	sets background graphic for the program factory
recsetback=grafics\bkblueteal1000.jpg 	sets background graphic for RecordSet Master
iconback=grafics\bkgray1000.jpg 	sets background graphic for the icon maker
barback=grafics\butbakbluZ.jpg 		sets background graphic for horizontal task bars
zbarback=grafics\butbakbluZ.jpg 	sets background graphic for vertical task bars
tcbback=grafics\bkgray1000.jpg 		sets background graphic for all TCB processes
allback=grafics\bkpurple1000.jpg 	overrides background graphic for all TCB programs
eMailMergeback=grafics\bkgold1000.jpg 	sets background graphic for emailmerge
eMailMergefont=&H00FFFF00& 		sets font for emailmerge
To=makpiya@aol.com 			sets To attribute for emailmerge
vcsback=grafics\bkgold1000.jpg		sets background graphic for vcsConvert
vcsfont=tahoma				sets font for vcsConvert
vcsfontcol=&H0025FEFE&			sets font color for vcsConvert

Note: the TCB flagviggall lets a TCB program ignore all tcbinit.txt background specifications.

TCB Process Flags

Flags are values that are usually set as the process is starting up. Thay may alter the position, view, and other attributes of the process window.

dateon= : dateon= displays the date and running time in the upper right corner of the process screen. Gets font information from the winspec.
    Example: dateon=

delwork= : delwork= sets deletion of SQL temporary files off. Can be toggled on and off.
    Example: delwork=

delwork= : iggall= ignore all background specs in tcbinit file.
    Example: iggall=

poson= : poson= The poson= switch over rides the process screen positioning and opens the screen just under the screen cursor when the process is executed.
    Example: poson=

postshow= : postshow= The postshow= delays displaying process window until all specifications are processed.
    Example: postshow=

scrollon= : scrollon= allows the process window to have scrollbars if needed.
    Example: scrollon=

stayontop= : stayontop= where: if set, sets the process window to be on top of other windows.
    Example: stayontop=

TCB Process Switches

Process switches change the look or functioning of the process window.

borderfix= : borderfix= toggles borders of the process window on or off. This allows the window to be sized or not.
    Example: borderfix=

caption= : caption=S1 sets the process window caption. If empty sets the titlebar off.
    Example: caption=TCB [currentprc]|

moveit= : moveit= toggles the process window to be dragged and moved or not.
    Example: moveit=

TCB System Variables Functions

The TCB mem(n) objects are data objects that can contain TCB system data or user data.

Universal Donor

mem0 is the universal donor meaning many functions expect default data to be found there and many function expect relevant data to be placed there before the function executes.

User Variables

mem1-21 these are user variables that can store data and can be used in functions and queries.
    Use: mvarin=M1;text(n)|S1|open     Example: mvarin=1;my data|

System Data    Use: function=[variable]     Use: mvarin=1;[username]|
        System data variables must be enclosed in "[ ]" to work

Environment

Other Variables

TCB Menuing

TCB gives the solution designer two kinds of menus to use. The sMenu and the pMenu.

sMenu

The sMenu lets the user have access to system menus. These are the menu bars shown beneath the title bar on almost all program Windows. TCB's sMenu lets the user decide when to show the system menu and can turn it off.

A sMenu specification is started with the keyword smenuspec= followed by the menu sequence number. Ex: smenuspec=My Menu, 1.

The smenuspec= line is followed by up to 16 sub-menu specifications. A sub-menu is started with the keyword sitemspec=, followed by a command string and a menu label. Ex: myprog.exe, My Program.

Unlike pMenus described below, this all the information needed to use system menus. a sample menu is below.

smenuspec=1,File
sitemspec=stayontop=,Toggle OnTop
sitemspec=winmin=,Minimize
sitemspec=browser=docs\zprocctrl.htm,About Process Control
sitemspec=quit=,Exit
sitemspec=endmenu

smenuspec=2,TCB Utilities
sitemspec=progfactory.exe,Program Factory
sitemspec=sqliteViewer.exe,Sqlite Viewer
sitemspec=webedit.exe,Web Editor
sitemspec=recset.exe,RecordSet Master
sitemspec=tcb.exe prcs\dbmanager.prc,Database Manager
sitemspec=associate.exe,Associate
sitemspec=endmenu
TCB sMenus have a single user function, smenu=. Its syntax is: smenu=[show|close|kill]. The form, smenu=show, displays the system menu if loaded. The form, smenu=close or smenu=kill, closes an open system menu. The user can have up to 10 displayed menu items, each with up to 16 sub-items.

pMenu

The pMenu provides the user with pop-up menus that can be invoked anytime anywhere. TCB's pMenu can lniked to any tangible object on a TCB window. A pMenu is started with the keyword menuspec= followed by the menu sequence number.
The menuspec= line is followed by 1 itemspec= spec. This spec has the below syntax:
itemspec=commandstring|...|, menu item label, itemType, 1, menu item sequence number

Items are grouped above a corresponding item header spec. Its format is below:
itemspec=comment, menu item label, itemtype=16, 2, header item sequence number begin with 1001

Example menuspec Form 1:
menuspec=2
itemspec=explorer.exe, Run Explorer,                    0, 1, 1
itemspec=notepad.exe, Run Notepad,                      0, 1, 2
itemspec=wordpad 3, Run Wordpad,                        0, 1, 3
itemspec=OpenOffice 5, Windows Utilities,               16, 2, 1001
itemspec=sep, separator,                                2048, 2, 4
itemspec=dbml.exe, ** TCB Apps **,                      0, 2, 1
itemspec=progfactory.exe|,Program Factory,              0, 2, 2
itemspec=sqliteViewer.exe|,Sqlite Viewer,               0, 2, 3
itemspec=webedit.exe|,Web Editor,                       0, 2, 4
itemspec=recset.exe|,RecordSet Master,                  0, 2, 5
itemspec=tcb.exe prcs\dbmanager.prc|,Database Manager,  0, 2, 6
itemspec=endmenu

Note: the menu above is one of two types of popup menus. It displays "Windows Utilities", a separator bar and a list of menu items from the separator bar on down. When Windows Utilities is clicked, the three menu items under menuspec are displayed.

The form below is different. It doesn't have a title item. Each menu is a straight pop-up. This form can simulate system menus described below by assigning each menu to a button at the top of the window.

Example menuspec Form 2:
menuspec=2
itemspec=dummy item|,Never reference this menu item,    0, 1, 11
itemspec=dummy, dummy,                                  16, 2, 1001
itemspec=endmenu

menuspec=3
itemspec=Backup|,Backup,                0, 1, 1
itemspec=cmd=RESTORE|,Restore,          0, 1, 2
itemspec=cmd=Export|,Export,            0, 1, 3
itemspec=endmenu

menuspec=4
itemspec=New Customer,New Customer,             0, 3, 1
itemspec=Edit Customer,Edit Customer,           0, 3, 2
itemspec=endmenu

Form 2 skips the first menuspec and references the menus using their ordinal position in the program specification. The number following menuspec= is ignored. For example; the pop-up function, popscreen=image;4;2, says that the program image number 4 will pop-up menuspec=2. This actually references the second menuspec even though its specification is menuspec=3.

The first menuspec should always be a dummy with pop-up menus otherwise how the menu displays could be compromised.

How to Use

Once you have your menu in place, it can be accessed using the popscreen= function. The popscreen= function syntax is below:
popscreen=object type;object index;menu number|
where object type is one of the list: butn|pict|list|text|comb|grid|chec|optn|slid|tree|labl|imag

Example popscreen function call:
popscreen=image;15;4| 
The above says to pop-up menu number 4 somewhere around image object number 15.

The TCB Data Control

The TCB Data Control makes accessing SQL databases almost trivial. Unlike controls put forth by Microsoft, the TCB Data Control is pure code and exacts no system overhead when being used. The data control is specified like any other object. Its syntax is shown below:
tdatspec=name,datsetspec,recset,recIdFld,recKeyFld,textstart,labelstart,norows,nocols,currentrec,recKeyFldNo,query

An example Data Control specification is shown below:
tdatspec=Ctrl3,data\admin.db3,journal,rsid,name,1,1,4,12,1,1,select * from journal

When a data control is specified, text boxes in a process can be filled with corresponding record item data. The text box to start filling is specified by the "textstart" attribute of a Data Control. The Data Control attributes you must get right for it to work are: datsetspec, recset and nocols

The Data Control is interacted with using the datctrl= function. Its syntax is below:
datctrl=n;[first|prior|next|last|save|add|delete|dbfind|;[index]

Example function calls are shown below:
    datctrl=1;first|
    datctrl=1;dbfind;21|

Note: Other functions can reference the data control query.

The TCB Web Object (webspec=)

The TCB Web Object Control makes creating web browser or internal document viewer almost trivial. The TCB Web Object uses the standard Microsoft Internet control. Unlike the normal use of this control put forth by Microsoft, Web Object is just one of the components of the TCB Web Object. The TCB implementation allows up to 99 Web Objects in a single TCB window. All objects can be controlled by a single controller and each Web Object is independent of other Web Objects.

Each Web Object is in its own frame Web along with a line button, a location bar, and a title/status bar. The line button toggles the object's online/offline mode. All objects in a set can be controlled with a single [back|forward|refresh|goto] control button set or each can have it's own controllers. The Web Object frame is "alive." It can be defined such that right-clicking in the frame executes the cmd1 attribute of the specification. Shift-left-clicking in the frame executes the cmd2 attribute of the specification. The demo process, webhuge.prc, has 24 Web Objects in a scollable window. In that program, right-clicking expands the viewport for the object. Shift-left-clicking restores the process to its specification position and size. The functions for this object are listed in tcbfunctions.htm.

Multible Web Objects can be controlled by a single control set. This effectuated by giving the specific control focus by clicking in the border of the control. This sets that Web Object as the default object. Several other Web Object functions also set this condition. This allows a single control to control many objects.

The name attribute name in a Web Object specification can be a multi-valued data item. First, a switch big followed by a bar "|" character. If this switch is present the Web Object control will occupy all the space in control except for a small border left and bottom. This feature is especially useful for the Web Object's original intended use. That is to provide an in program opportunity to display a HTML or PDF document, i.e., an on-board document browser within the TCB program window. Any other data in the name attribute is considered to be a URL and is loaded into the Web Object when it is created and activated.

TCB Inter-Process Messaging (IPM)

TCB IPM provides TCB programs the with the ability to communicate with other programs as well as TCB programs. There are two kinds of messaging performed, Message Send and Remote Control.

Message Send

Message Send is a process where TCB can execute a program and then link with it to send strings of data, messages. TCB can communicate with most any program with this method. Once the link is established, TCB can also terminate the running program at will. This method is typically used to send chunks of data to another program.

However, the client program (another TCB program) can be set up to treat incoming data as commands and attempt to execute the data. The functions for this method are the remote.. functions in the function list. The Message Send has four functions:

Message Send uses a convention called sendKeys. It is used to emulate key board input into a program. This methodology uses character sequences for special keys. For example line breaks are singnified by {ENTER} or just ~. A list of keys and the character sequence you need to send them is shown below.

BACKSPACE {BACKSPACE}, {BS}, or {BKSP} 
BREAK {BREAK} 
CAPS LOCK {CAPSLOCK} 
DEL or DELETE {DELETE} or {DEL} 
DOWN ARROW {DOWN} 
END {END} 
ENTER {ENTER}or ~ 
ESC {ESC} 
HELP {HELP} 
HOME {HOME} 
INS or INSERT {INSERT} or {INS} 
LEFT ARROW {LEFT} 
NUM LOCK {NUMLOCK} 
PAGE DOWN {PGDN} 
PAGE UP {PGUP} 
PRINT SCREEN {PRTSC} 
RIGHT ARROW {RIGHT} 
SCROLL LOCK {SCROLLLOCK} 
TAB {TAB} 
UP ARROW {UP} 
F1 {F1} 
F2 {F2} 
F3 {F3} 
F4 {F4} 
F5 {F5} 
F6 {F6} 
F7 {F7} 
F8 {F8} 
F9 {F9} 
F10 {F10} 
F11 {F11} 
F12 {F12} 
F13 {F13} 
F14 {F14} 
F15 {F15} 
F16 {F16} 
Key  Code  
SHIFT + 
CTRL ^ 
ALT % 

Remote Control

Remote Control is a process where TCB can establish a client/server relationship with another TCB program. In this type of relationship, one of the programs is the client. The client typically begins a relationship by broadcasting its client ID (this is all automatic). It the waits for another program to send it data. In this relationship, the client attempts to execute the data it receives.

When the server program is ready to communicate, it begins looking for a client ID being broadcast. When it gets a client ID, the server completes the link and is ready to send data to the client. The client executes the sent data as though the functions is performs comes from within. This means that the server program is in complete control of the client Window.

In this mode the server can actually create an entire TCB program and run it as long as it has a valid TCB program window, i.e., a winspec= specification and two object specifications to start with (this can be created within a process). You would also need a prespec function, prespec=linkcliset=, to start broadcasting.

For a client server relationship, each program has an ID. The IDs have the same form, the name of the form and something called the LinkTopic. When the client broadcasts its ID might look like this: rooster|zeus. Many of the Remote Control functions have to do with the IDs.

The functions for this method are the link.. functions in the function list. The Remote Control has fourteen functions and because there are many we refer you to the function list above.

The protosend function in the function list was actually created before the Remote Control was even designed. It performs the same function as the linksend= function.












Copyright © 1982-2016 Phoenix Information Systems/TM all rights reserved
Contact: Fred Pierce, makpiya@aol.com, makpiya@gmail.com, 831.240.9969