Data Object Slot Groups for RiverWare 6.8 -- Feature Description
Phil Weinstein, David Neumann, Edie Zagona, CADSWES -- Edit: 9-15-2015
Document Home: R:\doc\openObject\SlotGroups\SlotGroups-2015-Sep.docx

(1) Overview

Slots on data objects can now be grouped together within the Open Object Dialog in named slot groups.

When slot groups are shown, they are presented as top-level tree items, with their member slots shown as child items, visible only when their contained group's tree item is expanded. Slot group items are indicated with a boxed "[G]" icon (see above). The user also has the option of displaying slots as a flat list, without respect to slot groups. This allows the user to sort all slots on a data object alphabetically (by clicking in the Slot Name column header).

Any slot on a data object can be in one slot group, or in no slot groups. The introduction of slot groups does not change the relationship between a slot and its containing data object -- the slot is still functionally, and internally, contained directly within data object. The complete name of the slot does not change when moving the slot into and out from a slot group. Slot names and slot group names on any particular object are collectively unique. That is, no slot and slot group on a particular data object can have the same name. Also, it is not possible for slots in distinct groups on the same data object to have the same name.

  

Selected sets of slot groups can be copied and pasted, typically to other data objects. When copying slot groups to some other type of slot list -- i.e. to one which doesn't directly support slot groups -- e.g. an SCT or a (Pie-) Chart Output Device -- the slots contained within those slots groups are pasted.

There is also a high-level "Copy Slot Groups to Data Objects" operation which supports replication of a data object's slot groups to multiple other data objects. This can be applied even when the other data objects already have slots with the copied slot groups' slots' names, i.e. to apply only the grouping of such slots within other data objects.


(2) Slot Group Operations

The user manages slot groups in the Open Object Dialog for a data object with the following user interface controls:

  1. Menubar: Slot Group Menu
  2. Menubar: Slot Menu
  3. Context Menu on Slot Items
  4. Context Menu on Slot Group Item
  5. Slot Group Item tree control: toggle expanded/collapsed

Many of the menu operations apply the currently selected set of slot groups.

(2.1) Slot Group Menu

The Open Object Dialog for data objects shows a new "Group" menu for managing slot groups. The available operations are described below.

The "Show Slot Groups" checkable menu item controls whether the new Slot Group feature is visible. See also the image below. When the "Show Slot Groups" checkbox is off, slots are presented in the traditional way, as a single-level list of slot items. The state of this toggle is global within the RiverWare session: turning the "Show Slot Groups" checkbox on or off effects all Open Object Dialogs for data objects. This setting is saved in the RiverWare model file.

When "Show Slot Groups" is off:

  1. The "tree" ornamentation is hidden; slot items are flush against the left side of the slot list panel.
  2. Sorting of slots by name (e.g. after clicking in the "Slot Name" column header) is done without regard to placement of slots within slot groups.
  3. The other operations in the Group menu are disabled. (See below).
  4. The other slot group-related items in the slot list context menu do not appear.

Note: Slot group icons are now boxed "[G]" icons. The yellow folders shown in this screenshot above are from an earlier development version.

The "Expand-" and "Collapse All Slot Groups" actions open or close all slot group tree items, effectively showing or hiding the list items for slots within the slot group.

The "Move Slots to Group" submenu moves the selected slots to a particular slot group on the Data Object. The first item in this submenu is "None" -- selecting that removes the selected slots from their slot groups. The last item is "New Slot Group" -- this creates a default-named slot group, and moves the selected slots to that group. Note that any particular slot can be a member of only one slot group. So, moving a slot to a group removes it from a slot group it was previously a member of.

      

The "Remove Slots from Groups" action is the same as the "None" item in the "Move Slots to Groups" submenu -- it removes the selected slots from their groups. Such slots are then shown as top-level tree items.

"Create New Slot Group" adds a default-named slot group. Its name can be edited by double-clicking on the name.

"Delete Slot Groups" (enabled only when at least one Slot Group item is selected in the slot list) deletes the selected slot groups, after showing a confirmation dialog having these three buttons:

      

To provide a meaningful name to a newly created slot group (i.e. after performing Create New Slot Group), the user can edit the group's list item's name directly, but double clicking on it. (This is similar to how Aggregate Object Elements' names are assigned). The edited name must be distinct from the names of all slots and other slot groups on the object, and cannot be "None".

      

Note: Slot group icons are now boxed "[G]" icons. The yellow folder shown in this screenshot above is from an earlier development version.

(2.2) Slot Menu

The following Slot Menu operations which generally operate on slots instead apply to slot groups when only slot groups are selected. In that case, the text for these operations changes to reflect that difference. These are disabled when both slots and slot groups are selected. Compare also the two Slot menu screenshots below.

      

Delete Slots     /     Delete Slot Groups
Copy Slots   /   Copy Slot Groups
Paste Slots*   /   Paste Slot Groups*
Duplicate Slots   /   Duplicate Slot Groups
Copy Slots to Data Objects   /  

Copy Slot Groups to Data Objects

*The Slot/Slot Group Paste operations depend on the content of the Slot Clipboard (rather than on the slot/slot group item selection). At any given time, the Slot Clipboard can contain either slots or slot groups, not both.

The "Delete Slot Groups"operation in the Slot menu (which is just "Delete Slots" when slot items are selected) is the same as this operation under the Group menu. See above.

The "Copy Slot Groups" operation copies references to the currently selected slot groups to the system clipboard. Those slot groups them become available to be pasted within the same data object, or in the Open Object Dialog for a different data object. RiverWare features which support pasting of (only) slots from the slot clipboard will "see" the full set of slots represented by the clipboard's slot groups. See also the subsequent section: (3.2) Slot Group Copy and Paste Operations.

The "Paste Slot Groups" operation pastes the Slot Clipboard's slot groups into the dialog's data object. If the data object already has a slot group with the name of a slot group in the clipboard, then that existing slot group instance is used as the target for the paste operation -- i.e. that existing slot group will receive the slots from the analogous slot group in the clipboard. When pasting slots from a copied slot group, if slots having the same name already exist on the destination data object, slightly differently named slots (copies) will be created from the copied slot group -- a distinct four-digit numeric number will be added to slot names, after having removed trailing digits, spaces, and underscore characters. After the paste operation, only the newly created slot groups and slots will be selected within the Open Object Dialog's slot list.

Whereas the "Paste Slot Group" operation (above) always uses an existing slot group having the copied group's name, the "Duplicate Slot Groups" operation always creates new, slightly differently named, slot groups from the currently selected slot groups. It also copies the groups' slots, which are also given modified names.

The "Copy Slot Groups to Data Objects..." operation is a high level copy operation which makes use of a popup dialog. This operation is discussed in a subsequent section.

(2.3) Slot Item Context Menu

The slot list context menu on slot items new contains these three items. (These have been described above). See the following image.

  1. Show Slot Groups (checkbox)
  2. Move Slots to Group (submenu). This is shown only if the "Shoe Slot Groups" checkbox is on.
  3. Remove Slots from Groups

(2.4) Slot Group Item Context Menu

The slot group item context menu operations apply to all selected slot groups. They are all described in the prior "Slot Menu" section, above.

(2.5) Copy Slot Groups to Data Objects

Another recently development feature for RiverWare 6.8 (future release) is the "Copy Slots to Data Objects..." operation which supports the copying of a set of slots from any simulation object (including from a data object) to multiple other data objects. This is accessible from the Slot menu, and applies to the set of currently selected slots. That newly developed functionality is described in this feature document:

Open Object Dialog, Slot Copy/Paste Enhancements for RiverWare 6.8
R:\doc\openObject\CopySlots\OpenObjCopyPasteEnh-Aug2015.docx

This operation has been enhanced, as the "Copy Slot Groups to Data Objects..." operation, to support the replication of whole slot groups to multiple other data objects. "Copy Slot Groups to Data Objects..." appears in the Slot menu when only slot groups are selected within the slot list. It also appears in the slot group context menu. Here is a comparison of the popup dialogs for the two related slot and slot group operations:

If the "Show Slots" checkbox is off, only the names of the slot groups which had been selected are shown. If it is on (see above), each group's contained slots are also listed among the Copied Slot Groups.

As with the manual slot group paste operation, if the destination data object already contains a slot group having the name of a copied group, then that existing slot group is used as a destination for the pasted slots. However, this higher-level paste operation allows the user to specify the slot paste behavior when the destination object already contains slots having the copied slots' names. If such slots exist, and the user chose "Do not paste slot,", the slots are moved into the group being pasted. So, this operation can be used to reorganize slots on all data objects (into groups) even when all such slots already exist.

Upon clicking the "OK" button, the copy operation is performed, and the slot group and slot creation counts are presented. (This does not make mention of relevant slots already existing on the destination data objects which were moved to a different slot group) ...

(3) Other Functionality

(3.1) Slot Ordering Operations

The following screenshot shows the Open Object Dialog's slot ordering controls for a data object having slot groups. Note: Slot group icons are now boxed "[G]" icons. The yellow folders shown in the screenshot below are from an earlier development version.

Slot group items in the Open Object Dialog (for data objects) are included in the custom orderings implemented for slots. When the "Custom for this Object" ordering is selected (e.g. as opposed to Column Sort) slots and slot groups can be moved up or down using the blue arrow icon buttons below the slot list/tree.

Custom slot ordering now includes these new provisions:

  1. Multiple selected Slot Group items can be moved up or down in the list.
  2. Slots within (under) a Slot Group can be moved up and down within the group. It is not possible to move slots into or out from a slot group with these controls. Any selected slots not in a slot group "jump over" any encountered slot group.

The blue arrow icon buttons are disabled if BOTH Slot and Slot Group items are selected -- only one or the other type can be moved up or down at any given time. However, any arbitrary slot selection can be active when moving slots, including both slots in, and not in, slot groups, as illustrated above.

(3.2) Slot Group Copy and Paste Operations

Background: The RiverWare Slot Clipboard contains references to existing slots (or, now, to slot groups) in the loaded RiverWare model. That is, "copying slots" causes references to those slots (or slot groups) to be placed in that clipboard. Most applications which can "paste" slots into a slot list (e.g. the Chart output device configuration dialog) make use of those slot references as references. Only the Open Object Dialog for data objects actually makes copies (new cloned instances) of the slots when pasting from the slot clipboard.

The RiverWare Slot Clipboard has been enhanced to support references slot groups. At any given time, the Slot Clipboard will contain references only to slots or to slot groups. But when the Slot Clipboard contains references to slot groups, any application within RiverWare which queries the Slot Clipboard for slots -- e.g. the (Pie-) Chart output device configuration dialog -- will "see" references to all of the slots within the clipboard's current slot groups.

The Open Object Dialog supports pasting of slots or slot groups from the Slot Clipboard only when that dialog is for a Data Object. It supports different behaviors for the two cases of the Slot Clipboard containing slots vs. slot groups. If the slot clipboard contains groups, a new slot group will be created on the Data Object if that object doesn't already have a Slot Group with that name. Then, any slots within the clipboard's referenced slot groups will be copied (cloned) into those Slot Groups in the dialog's Data Object.

The two variants of slot / slot group pasting implement the same slot name uniqueness algorithm. That is, if the Data Object already has a slot with copied slot's name, the newly created slot on the Data Object will be given the next available four-digit numeric suffix to insure slot name uniqueness. Note that the higher level "Copy Slots/SlotGroups to Data Objects" function shows a dialog box which allows the user to select between three different conventions for handling previously existing slots in the destination data object.

--- (end) ---