CED

CED

Top  Previous  Next

 

The CED command executes the data collection editor.

 

 

Format

 

CED {DICT} file.name {id...}

 

where

 

file.nameis the name of the file containing the data to be edited.

 

idis a list of ids for the record(s) to be edited. If omitted, the default select list is used. If this is not active, the user is prompted for the record ids.

 

 

The CED command allows creation, viewing or editing of a data collection in a collection file or a JSON string from a normal file. The same functionality for a data collection variable within a QMBasic application is available using the !CED() subroutine.

 

 

On entry to the collection editor, the top level item within the collection is displayed, showing the names, data types and values of each element of the item. If the item is an array, the element numbers are displayed as their names. A marker in the leftmost column identifies the currently selected element.

 

The following keys are available:

Cursor up/downSelect previous/next item
Page up/downMove to previous/next page
F1 or ?Display help screen
F3Rename element
F4Change element data type
F5 or Ctrl-CCopy selected element
F6 or Ctrl-XCut selected element
F7 or Ctrl-VPaste previously copied/cut element
Ctrl-QQuit from any level
Ctrl-SSave changes, continuing edit
DelDelete selected element
Ins or Ctrl-IInsert a new element
ReturnDive into selected element
EscReturn to parent element or exit from action on a data element

 

The F3 (rename) action prompts for the new name and applies it to the selected element.

 

The F4 (change element type) action prompts for a new data type. Only those that are valid translations of the selected item are offered.

 

F5, F6 and F7 or their control key equivalents operate in a similar manner to copy/cut/paste in Windows applications. When pasting, a prompt appears asking for the new name.

 

The Del key deletes the currently selected item without saving it for later pasting.

 

The Ins key prompts for an item name, data type and value. When inserting a collection or array, an empty item is inserted to which values can be added separately.

 

Using the Return key to dive into an element which is a further collection or an array displays the elements within that item. The current element path is displayed at the bottom of the screen.

 

Using the Return key to dive into a data element allows the element to be modified. Use of Return commits the change, use of Esc exits without changing the data.

 

When editing is complete, entry of Q at the top level item or use of Ctrl-Q at any level exits from the editor, offering to save changes if appropriate.

 

 

See also:

Data collections, data collection files, !CED()