NetAlive Documentation

View Tutorial

NetAlive has an evolving "view" facility somewhat similar to the "document/view architecture" prevalent in many computer applications.

The standard document/view architecture lets several "windows" display the same data item. Furthermore, the different windows may display the data differently. For example, several windows in a word processor can display the same document. Some windows can view the document in What-You-See-Is-What-You-Get (WYSIWYG) mode and others in "outline" mode.

Similarly, several NetAlive windows can display the same application. Furthermore, the windows can view different parts of the application and with different screen layout.

NetAlive deviates from the standard document/view architecture to accommodate special issues...

NetAlive Document/View Architecture

The part of a NetAlive application can be divided into a document and a view group. This division manifests itself when the user creates a second "window" on the same NetAlive application.

The Intertask defines the document group. Regardless of the number of "windows" the user creates, an application has one Intertask consisting of one copy of each widget and functional task. A widget's internal or external file data is never replicated, nor is a function's source or executable code.

Each "window" the user creates gets a separate copy of operating-system-level subwindows known as "controls" or "widgets." Window-oriented operating systems support pushbuttons, list boxes, text boxes, etc. through objects known as "controls" or "widgets." Each of these objects has an independent position on the screen and internal data. Thus each text or list box has an independent copy of the text it contains. Each of these objects process mouse and keyboard actions independently. Thus a text box can be edited and a list box scrolled independently of the main program.

NetAlive maintains consistency between widgets and the screen controls according to the following rules:

List boxes are an example of a screen control whose contents cannot be changed by the user. If a list box widget receives three entries "a b c," NetAlive will immediately load all screen controls associated with the widget. The user will not be able to change the contents from "a b c," so the list boxes will contain the same data forever. The user can make selections independently among the multiple list boxes, however. Thus, one list box could have "a b c" with "a" selected and another could have "a b c" with "b" selected.

Text boxes are an example of screen controls whose contents can be changed by the user. If a text box widget receives input "misspeled," NetAlive will immediately load all screen controls associated with the widget. The can then edit any screen control, changing the contents to "misspelled." During the editing, both "misspeled" and "misspelled" appear on the screen in separate screen controls. When the user finishes the editing by "defocusing," NetAlive will reload all other edit controls with the new value "misspelled."

View Layout

NetAlive supports multiple appearances for each window. This lets the designer create several "screens" within one application.

A straightforward use of multiple appearances is for a NetAlive document to have several views that differ by the size and position of the widgets. More sophisticated designs use a NetAlive feature where a widget can be "disabled" independently in each view. Generally, if some widgets are disabled in one view and the rest in another view, one gets two completely different views.

For example, say an application needs "screens" for "setup," "normal operation," and "printing." The designer creates an Intertask with widgets for all three phases. The designer then creates a view for "setup." In this view all widgets pertinent to setup get arranged suitably and all others get disabled. Views are created similarly for "normal operation" and "printing."

View Switching

The end-user needs to switch between views consistently with the design of the application. For example, say an application has "screens" for "setup," "normal operation," and "printing." The application needs to switch from the "setup" layout to the "normal operation" layout at a predetermined point.

The NetAlive designer controls this view switching by putting a "goto" parameter in certain widgets. When a widget containing a "goto" parameter fires (or creates a message), NetAlive will switch that window to the view specified by the goto parameter.

A button bar is a straightforward example of view switching. A button bar is a row of buttons, typically at the top of the screen, that switch between views. A NetAlive designer implements a button bar with one button widget for each view (i. e. "setup," "normal operation," and "printing." Each button has the corresponding view as its "goto" field (but is otherwise disconnected). These buttons "fire" when pressed, causing NetAlive to switch to a different view.

Evolving View Facility

The view facility will undergo a rapid evolution. Enhancements will be backwards-compatible.

The current view facility has five views per application and the views are named 0-4.

Interactive Demonstration

Press to invoke tutview.net.

Familiarize yourself with the application's 5 views by repeatedly activating the "View -- View Control -- Next" function (the equivalent toolbar button is more convenient). Each activation advances to the next view, reporting the view number in the status bar.

Press buttons on the "button bar" and observe the affect. The button bar is simply five disconnected buttons with their "goto" field set to a different view.

Add a widget. Switch to "Intertask view," activate the palette, and drag any widget onto the program surface. Switch between views and observe that the widget appears in the same place in all views. (Note: the "button bar" only works when a document is "running." "Control -- Run" from the menu starts an application running.)

Customize the views. Switch to "Edit document view" and move the widget by dragging the resizing border. Switch to other views and move the widget. Note that the widget has an independent position for each view.

Disable the widget in a view. Press Shift and click the mouse on the widget's resizing border. An "Edit coordinates" dialog appears. Select a view and press "Disable." Note that the widget has disappeared from this view altogether.

Copy a view. Select "View -- View Control -- Copy n" from the menu. Shift through the views with "View -- View Control -- Next" and observe that a duplicate of the original view now appears a view n.


[NetAlive Documentation Home Page][NetAlive Home Page]