The VideotexMapper object is used to drive the Carapace Videotex mapping.
The map for a particular Videotex service is defined as as set
of page definitions. These are loaded into the
VideotexMapper object which then performs the mapping.
The create function can be used to create a VideotexMapper
object eg.
(create VideotexMapper)
Once created, this object is tailored using its properties
and methods.
A VideotexMapper object supports the following properties:
| property name | property type | description |
|---|---|---|
newPageEvent |
Event |
an event which page triggers can set when a new page is detected -- this
event is usually set through use of the method
detectNewPage
|
screen |
Screen |
holds a representation of the current Videotex screen |
currentPage |
VideotexMapPage |
if non-() holds the definition for the currently matched
Videotex page
|
environment |
HashTable |
an environment for use by the mapping triggers which persists across different pages |
upload |
HashTable |
data available to be uploaded to the Videotex service |
A VideotexMapper object supports the following methods:
| method name | description |
|---|---|
loadPages |
load page definitions from the supplied file |
clearPages |
remove all the currently loaded page definitions |
isCursorAt |
test if the cursor is at the given location |
isCursorOnAt |
test if the cursor is on and located at the given position |
detectNewPage |
mark the arrival a new Videotex page if the cursor is on at the given position |
identifyScreen |
attempt to identify the current Videotex screen from the loaded page definitions |
isComplete |
test if the current page is complete and ready for mapping |
scrapeCurrentPage |
scrape the data from the current Videotex page according to the current page definition |
displayFile |
display the Videotex stored in the supplied file |
mapCurrentPage |
map the current page |
currentPageOptions |
list the options for the current page |
setError |
record an error within the mapper -- this is typically picked up and processed by a different thread |
setLog |
use the supplied log |
loadPagesLoad page definitions from the supplied file -- the name of the first page is returned.
Arguments:
| filename | String |
Return type: String
clearPagesRemove all the currently loaded page definitions.
Arguments: none
Return type: the empty List ()
isCursorAtTest if the cursor is at the given location.
Arguments:
| row | Integer |
| column | Integer |
Return type: the empty List ()
is returned if the cursor is not at the supplied position.
isCursorOnAtTest if the cursor is on and located at the given position.
Arguments:
| row | Integer |
| column | Integer |
Return type: the empty List ()
is returned if the test fails.
detectNewPage
Mark the arrival a new Videotex page if the cursor is on at
the given position. This is usually used within a trigger -- e.g. a hotPatch
trigger, so the function allows for the trigger to be re-enabled on the screen.
Arguments:
| row | Integer |
| column | Integer |
| triggerName | String |
Return type: the empty List ()
identifyScreen
Attempt to identify the current Videotex screen from the loaded
page definitions -- returns the string unknown or the name
of a matching page.
Arguments: none
Return type: String
isCompleteTest if the current page is complete and ready for mapping.
Arguments: none
Return type: the empty List ()
if the page is not complete.
scrapeCurrentPageScrape the data from the current Videotex page according to the current page definition -- this is stored in the "history" part of the environment unless an argument is supplied.
This uses the extractFields part of the page definition.
Arguments:
| (optional) record | Object |
Return type: HashTable
displayFileDisplay the Videotex stored in the supplied file.
Arguments:
| emulator | Dispatch |
| filename | String |
Return type: the empty List ()
mapCurrentPage
Map the current page. The value returned is that returned by the map method
setup for the current page.
Arguments: none
Return type: Object
currentPageOptions
List the options for the current page as defined by the page's options statement.
Arguments: none
setErrorRecord an error within the mapper -- this is typically picked up and processed by a different thread.
Arguments:
| err | Error |
Return type: the empty List ()
| Contents | Current topic: videotex | Related topics: Carapace Hub |