Jargon Software
Getting Started with Jargon Writer
Section 3 - Using the Task Editor Window

Contents of this Section:

Overview of the Task Editor Window

Tasklists Listbox

Task Tree Panel

Task Properties Panel

Target Tree

Status Panel



Overview of the Task Editor Window

JWScrn07.gif

The Task Editor Window is where all tasklists and tasks can be defined, modified or removed. These tasklists and tasks contain the client-side logic that is executed when certain user actions occur or when they are invoked by other client or host procedures. To open this window, select "View-->Task Editor" from the menu bar in the Design Window. You can also double-click a tasklist in the "Available Tasklists" or "Tasklists to execute" listboxes in the design window to both open the Task Editor and open the selected tasklist in the task tree for editing in one step.

User Tip: When you are working in this window, at each step a short one-line help message will be displayed in the status panel at the bottom of the window that suggests what to do next. You can also click the "More info..." button to the right of the status panel, which will bring up a more detailed help document in a browser. This document discusses each step in detail. Once opened, you can also browse through all documents for previous and subsequent steps, so that you can understand the entire process of adding and changing tasklists and tasks.
A Tasklist is a name assigned to a group of one or more tasks. Each task in a tasklist can be a Client Task, Host Task, Nested Tasklist, or Conditional Task. A tasklist can contain any number of tasks, of any type, in any desired order. You can think of a tasklist as being similar to a host procedure, with each task being one statement in the procedure. A tasklist can be executed as a result of any of the following actions: Client Tasks are run entirely on the client, without any host interaction. These tasks are normally used to either change the state of an object (such as making a frame visible, enabling a button or populating a listbox) or to obtain a "return value" from the client (such as getting the current value in a textfield). The objects referenced in a Client Task may be objects in the same "app" or in any other "app" which has been opened in the Task Editor Target Tree. For example, this allows "myapp1" to open a frame in "myapp2" when a button is clicked in "myapp1" which is linked to a tasklist containing a client task that makes the frame visible.

Host Tasks are run on both the client and the host.

During this entire process, the "host communications" animated image will be moving back and forth. When all CIOs sent by the host have been completely processed by the client, the animation will stop.
User Tip: Note that one or more of the CIOs may be message or warning boxes, which are modal objects (the user cannot do anything else in the app while a modal dialog box is displayed). If a CIO containing a message box or warning box is received, the animation will continue until the user dismisses this modal box by clicking the OK button, so that the processing of any other CIOs in the host task can be completed. After all CIOs received from the host have been processed, the host task ends and then the animation ends.
Nested Tasklists allow a tasklist to contain one or more previously defined tasklists as tasks. With proper design,  this feature will promote object reusability, reduce the number of tasks that must be defined for an application, and simplify long-term maintenance and support efforts. Tasklists may be recursively nested to any level.

Conditional Tasks allow true "If/Then/Else" logic by executing one of two tasklists, depending on whether the result of a specified test condition is true or false. The condition compares two operands, either of which can be a constant or the result of a task (such as getting the current value of an object). The available comparison operators are: EQ, NE, GT, LT, GE, LE or CONTAINS. You may also select a "Match Case" checkbox for any comparison operator. The true/false tasklists are defined in the same manner as any other tasklist, and may contain any mixture of Client, Host, Nested or Conditional Tasks, which means that conditions may be nested to any level as well.

Tasklists are executed when they are invoked by another client or host procedure, or when any of the event(s) to which they are linked take place. Tasklists are linked to an event of an object by associating them in the Events Panel of the Properties Panel in the Design Window. For a more comprehensive discussion of tasks, objects, methods and events, see the Overview of Tasks and Events section.
 

Tasklists Listbox

Tasklists are added, deleting and selected for editing in the Tasklists Listbox in the upper left-hand corner of the Task Editor. This is also where a tasklist is selected to be a nested task within another tasklist.


Task Tree Panel

The Task Tree panel displays the contents of the tasklist which has been selected for editing (the "currently active tasklist").  This tree works the same way as other trees in Jargon Writer, such as the Component Tree in the Design Panel, so the explanation of generic tree behavior (expanding, contracting, etc.) is not repeated here, except a reminder that a right mouse click will fully expand or collapse the contents of any branch, including the root node.

The top (root) node is the tasklist itself. When it is highlighted, you may add tasks to the tasklist and may change the name of the tasklist in the Task Properties Panel.

When a task is highlighted, you may change its name (see suggestions below) and edit other properties of this task in the Task Properties Panel. These properties vary depending on the type of task.
User Tip: You may wish to establish a naming convention that will make tasklist and task names consistent and easily recognizable and understandable. For example, Jargon Replicator creates tasklists with the prefix "TL" followed by one or more words with initial caps, such as "TLGet" and "TLBrowseGet".  Host tasks have names prefixed with "HT", such as "HTGet", and client tasks have names prefixed with "CT", such as "CTExit". Names for conditional tasks could be prefixed with "IF", such as "IFValueIsZero".


Task Properties Panel
The contents of the Task Properties Panel depend on the type of object that is highlighted in the Task Tree. The following discussion lists the properties for each possible type of object  in the Task Tree with notes on their use.
 

Client Task Properties

For a Client Task node, the properties are:

Host Task Properties

For a Host Task node, the properties are:

Conditional Task Properties

For a ConditionalTask node, the properties are:
 

Nested Tasklist Properties

For a Nested Tasklist node, the properties are the same as described above for any tasklist and type of tasks that it contains. A nested tasklist can be edited either in its "nested" location as a task within another tasklist, or as a "normal" tasklist by selecting it for editing from the Tasklists listbox. Any changes made under either approach will take effect everywhere that the tasklist is referenced, since there is actually only one copy of the tasklist, and the nested copies only contain pointers to it, not a completely duplicated copy of its contents.
User Tip: Watch for nested tasklists (look for the "tasklist" icon in the task tree) when editing tasklists, because if you edit a nested tasklist in one place, the changes will apply everywhere that it is used in this app.


Target Tree

The Target Tree is used to select the object upon which a task will operate. It works like all other trees in Jargon Writer. The target object can be any object in the currently active app, or it can be any object in any other app which is opened in the Target Tree. If you are opening another app, it must be in a directory that can be accessed in the "Open a File" dialog box which appears when the "Open" button at the top of the Target Tree is clicked.

To select a target object, open the desired app, then expand the tree until the desired object is visible, then click on that object so that it is highlighted, then click the "Set Target" button in the Target Properties Panel.

To change a target object that has been previously set, highlight the node that contains it in the Task Tree, then follow the same procedure to select a different target object. Note that this will recursively remove the method and any subtasks that were under the original target, and the definition of the new target object must be completed as well.

User Tip: If the "Set Target" button is not shown, it is probably because the correct node is not selected in the Task Tree.


Status Panel

The Status Panel at the bottom of the Task Editor Window contains a one-line message area at the lower left in which various Jargon Writer help messages are displayed during each step of working with tasks. Also, there is a "More info..." button at the lower right. When clicked, this button opens a browser window to display more detailed help specific to the current step. No input fields are used in the Status Panel.


<-- Previous Section   Up to Top       Return to Help Index         Next Section -->