Browse Application
In this example we will create a Web browser. The browser accesses
explicitly typed URLs and permits hyperlinking from the display.
Step 1: Create the application
- Create an empty application, switch to Intertask view, and
enable the palette.
- Drag a text box task and drop it on the design space. This
will be the text box for explicitly typing-in a URL. To put a
static heading on this widget: double-click the task, select the
"Graphic" dialog, change the caption to "URL:,"
and enable "Show caption."
- Drag-and-drop a "merge" task. The desired program
behavior calls for treating URLs from two sources the same. Merge
combines typed URLs with hyperlinks. (Note: the graphic uses name
"asynchronous append" instead of "merge.")
- Create an arrow from URL: to merge.
- Drag an "HTTP Access" task and drop it on the design
space. Connect the output of merge to the 7 o'clock position of
this task (see discussion below about why 7 o'clock).
- Drag a "Textual HTML" task and drop it on the design
space. Put a static heading on this widget saying "HTML page:"
using the method described above.
- Connect the output of HTML page to the input of asynchronous
append. The screen should appear as shown below.
- Switch to edit document view and reposition the widgets for
a pleasing layout.
- Press the start button.
- Type-in a URL. Upon defocusing, the application will fetch
and display the specified URL.
- Click on a hyperlink. The new URL will supersede the display.
The screen should appear as shown below.
Discussion: The HTTP access task can access HTML data or submit
forms, depending on its inputs. By convention, NetAlive uses 7
o'clock inputs for "dynamic addresses" like a URL, and
the 9 o'clock input for data like "post data." The HTTP
access task uses method GET or POST depending on whether a 9 o'clock
input is present. NetAlive resolves relative URLs from the context
of the last URL accessed (feature not implemented in version 0.0.3).
The HTTP access task gets data from a standard HTTP server. (The
HTTP access task has additional properties not described here.)
The Textual HTML task displays HTML input in a widget.
The widget cannot be changed, but clicking on a hyperlink causes
output of the hyperlink's URL. Version 0.0.3 of NetAlive can display
HTML only as characters, hence the adjective "textual."
Completing the Application
- A typical Web browser maintains a history of HTML pages for
backtracking, etc. The Textual HTML widget maintains such as history,
but connection to "forward" and "backward"
buttons.