tsc_IReviewable

This interface class allows the Job Review window display to be customised for certain record types, such as Custom database records.  A subclass is made of the class that represents the database record, and tsc_IReviewable should also be supplied as a base class.  Then override the abstract methods to provide the record display information.

It is possible to supply a UiTree fragment to be shown in the Job Review summary window, and/or an entire form to be displayed when the item is selected in the Review window.

Public methods

virtual void GetReviewTree (class tsc_UiTree& tree, bool expanded) = 0;
This method is called when the Job Review window wishes to display a row containing this item.

To display custom data in the Review window, override GetReviewTree() and populate the supplied tree with the required information.  The top level of tree maps to the record's top level row in the Review window. Only one row should be added to the tree.

The expanded parameter is true if the user has expanded the row which requires subtree items are to be displayed. If the expanded parameter is false, it is more efficient (but not mandatory) to return just the topmost row and an empty subtree.

If this method is not overidden, a default tree for the record type is displayed.

virtual bool HasReviewForm () = 0;
Return a value indicating whether the ShowReviewForm method has been implemented to display a form when the record is selected.

virtual tsc_ReviewActions ShowReviewForm () = 0;
If a custom review form is to be displayed, this method should display the form.  Note that this form will be running under the Job Review UI Task and thread.

Important: The form must have X_SoftkeyPrevious and X_SoftkeyNext as the first two softkeys, and ShowReviewForm must return either tsc_Review_Previous or tsc_Review_Next, when the respective softkey is pressed. If changes were made to the record via the form, they should be stored in the database before returning.

If no form is supplied, this function must return tsc_Review_ExpandTree.

Version 4.00 and beyond:

Partial support for review forms is present in version 4.00; if there is sufficient demand, it will be expanded to provide functionality equivalent to previous versions.

The main difference in version 4.00 is that Review has become a split window. The job review list appears on the left, and any database record details form appears on the right. The downside of this scheme is that the Softkeys and the Esc and Enter buttons along the bottom of the form are set by and control the review list, and not the record details form.  If softkeys are added to the form they will not be drawn.

One workaround is to make the review form read-only, and add an Edit button to the form itself. When the user taps the edit button, launch a tsc_UITask with a fully editable version of the form.

Note: It is strongly suggested that the review form uses auto-layout, or if using custom layout then all fields are placed in the left-hand half of the window to ensure visibility.

The HowToSample project that is installed with the SDK contains a CustomDatabase example which implements this interface and displays a custom form.