An add-in is a C or C++ software module that can be added to techexplorer to extend techexplorer's ability to process and display various types of data. Users can install add-ins without the need to modify or update techexplorer. Each add-in maintains, processes and/or displays instances of add-in specific data embedded in techexplorer documents. Furthermore, Java applets can use techexplorer as a bridge for harnessing add-in functionality.
From the perspective of a
developer, an add-in is an object that supports a specific MIME type and allows the
object to interact with techexplorer, HTML elements and Java/JavaScript.
In what follows we provide an overview of how techexplorer
locates add-ins and then describe the life cycle of an
add-in module. We then introduce the techexplorer
Evaluation add-in API and describe the
\evalLink
control sequence for invoking add-in
functionality from techexplorer documents.
On Microsoft Windows 98/95/NT, the techexplorer add-in modules can reside in the IBM techexplorer Hypermedia Browser\Addin subdirectory of the techexplorer documentation directory or in the techexplorer\bin subdirectory of the web browser Plugins folder. For some installations, the full path of the techexplorer add-in repository might be
C:\Program Files\IBM techexplorer Hypermedia Browser\Addin C:\Program Files\Netscape\Communicator\Program\Plugins\techexplorer\bin
When techexplorer is loaded, it searches the add-ins repository
for all files whose name begins with TA
and ends with .dll
.
techexplorer
then retrieves the MIME types each add-in handles and other descriptive information.
If multiple add-ins handle the same MIME type, the last add-in examined handles the
MIME type.
Unlike stand-alone applications, the life cycle of a techexplorer add-in is dictated by techexplorer, just as Netscape plug-ins are under the control of the web browser. The life cycle of an add-in is
The add-in API requires an add-in to include methods for the basic processes of initialization/shutdown and instance creation/destruction. In the context of processing or displaying data, an add-in may provide methods for the techexplorer Evaluation API. The Evaluation API is used for transmitting application-specific data from a techexplorer document or Java applet to an add-in.
This version of the techexplorer Java API does not manage multiple instances of add-in data originating from Java applets. Java applets can only initialize, shutdown and request that data be processed by a particular add-in. The add-in will not be able to identify which applet generated the request. See the section detailing the bridge between Java and techexplorer add-ins for more information.
Use the \evalLink control sequence for transporting an object from a techexplorer document into another application via the Evaluation add-in API.
\evalLink{description}{mimeType}{applicationInput}{textToDisplay}
For example, we can use the following control sequence to invoke the Simple add-in example shipped with the professional edition of techexplorer. The Simple add-in can display in a pop-up window either embedded text or the contents of a URL.
\evalLink{Simple add-in: fetch URL}{application/x-simple-url}{http://www.ibm.com/index.html}{here}
Here is an embedded techexplorer instance that uses the Simple add-in to fetch and display the HTML source of the main IBM web site. Try it!
|
Problems?
If nothing happened you are either not connected to the Internet or are still waiting for the document to be retrieved. The Simple add-in will display the HTML source for http://www.ibm.com/index.html once it has received the data. Be patient!
As another example, enter text in the HTML input area below to view your text string displayed by the Simple add-in.
For each of the preceding examples, the mimeType is used to identify both a particular add-in and its functionality. In the case of the embedded techexplorer instance, the mimeType is application/x-simple-url. This tells the simple add-in that the applicationInput parameter is a URL. In the case of the JavaScript enabled HTML form, the mimeType is specified as application/x-simple-string indicating that the applicationInput is to be displayed as raw text.
You can use the DocumentExplorer add-in to examine the techexplorer document structure. Just include the following control sequence in your document:
\evalLink{IBM techexplorer Document Explorer Add-In}{application/x-document-explorer-string}
{}{Press here for a DocumentExplorer test}
Here is an embedded techexplorer instance that uses the DocumentExplorer add-in to display the document structure. Try it!
IBM techexplorer Hypermedia Browser not installed! Please visit the
techexplorer home page
for more information.
|
IBM techexplorer Hypermedia Browser is a trademark of the
IBM Corporation.
Send comments and questions to
techexpl@us.ibm.com.
Visit the official techexplorer home page at
http://www.software.ibm.com/techexplorer/.