TCB Web Jukebox

What is it?

TCB Web Juke Box (prcs\zwebjuke.prc) provides an example of using multiple web browser objects in a single process.This allows an entire set of documents to be displayed in a single TCB program window. The window is organized similar to many of the TCB programs in this distribution. Top-left is a tiny button programmed for prototyping. To the right of it is the program label and to the right of the label is the program title.

Beneath the prototyping button is a column of three buttons. The blue button displays this file, the orange button toggles stay-on-top and the red button exits the program. Top-center of the window is a row of buttons described below. Top far-right is the IDE button. Clicking it quits and re-runs the program. Right-clicking the IDE button serves up the program with Notepad for editing.

The body of the screen is mostly occupied by a set of TCB Web Objects aligned in rows and columns. At the bottom of the display the user will find a function key legend and a copyright notice. The Jukebox window makes use of the important TCB feature of scrollable main windows. The end user can easily set the number of browsers they wish to open at once.

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.

A Web Object control specification is show below. Note the use of the big= flag.

webspec=big=|docs\aboutthis.htm,cornsilk,3015,600,600,4125,grafics\bkgold1000.jpg, line,tahoma,10,-1,url,beige,black,tahoma,9,0,title,turquoise,ms sans serif,8,0,webrest=1|,	mvarin=1; 1|cmd=EXPAND|,right-click to expand shift-left-click to restore,0

When the OffLine button is clicked twice, the button color and caption will change to indicate the controls ordinal number and on/off-line mode. In this implementation of the Web Objects, right-clicking expands the control to a larger view port near the top and left of center of the Jukebox window. Shift left-clicking in the control frame restores the control to its loaded position and size. Clicking in the control frame also sets that control as the default for subsequent button operatons.

The webmod=on function allows the Web Objects to be moved around the window. The webmod=off function turns off movement. The URL of any Web Object can be obtained using the weburl2= function. See the TCB functions document

The Button Row

There are nine colored buttons positioned in a row top center of the Jukebox window. The Back, forward, Refresh, and GoTo buttons perform the same functions that any similar web browsers perform. Those four buttons are tuned to whichever Web Object is the default (click the Web Object frame). The next five buttons are keyed to open the relevant panel by clicking it and closing that panel by right-clicking.

Three Panels

This TCB program has its own database designed for storing email, downloads, and bookmarks. Each of those items is represented by an integrated pop-up panel. The Bookmarks panel lets the user select a bookmark and load it into the default web object. It also provides one-stop maintenance for bookmarks. The Send Mail control panel let's you browse/edit emails and/or send an email with a single click. Send Mail integrates the TCB email.exe program. The Download panel lets the user manage downloads and send a download with a single click. Download integrates the TCB download.exe program.

Each of the three panels mentioned above operate the same way. The user is presented with a pop-up window with a set of buttons, labels, text boxes, and images. The images are also buttons. The white text boxes represent a single data item or column in a table of relevant data.

Beneath the labelData Control is a row of graphic buttons. They let the use scroll through the table and update, add or delete records. The box to the right of the data control is a box that lets the user enter a search query for a particular record. example: mydataitem like '%fred%';
The query above returns any record where the data item, mydataitem, contains the text "fred" in any case.

When the Select button is clicked, the user is presented with a a datagrid containing records from a table relevant to a specific panel. The user selects a record (a "*" wil appear) and then right-click in that row loads that record into the editor and the grid closes. The user then clicks the button below the Select button.

For Bookmarks, clicking the Run URL button loads the URL into the default Web Object. For Send Mail, clicking the SendIt button causes a command line to be composed and sent to the TCB email.exe program. Clicking the Download button in the Download panel causes a command line to be composed and sent to the TCB download.exe program.

Jukebox Control Panel

The Jukebox Control panel has title top center, a large text box occuping most of the space with a row of butons above it top-left. The left-most or first button executes the contents of the text box. The second button runs the text in the text box as a XQL query. XQL is a TCB construct consisting of the database location and any mix of SQL statements and SQLite DOT commands.

The third button presents a dialog to find a file to load into the text box. The forth button presents a dialog to select a location and file name to save the text box contents to. The last button clears the text box. 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.

InterProcess Messaging (IPM) Panel

The last panel in Jukebox is the Messaging Control. It lets the user setup client/server relationships with another TCB 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.













































































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