DataSetCmd - Interface to Main Application and GUI

From STX Wiki
< Programmer Guide‎ | Macro Library
Revision as of 12:43, 2 March 2018 by Toni (talk | contribs) (Created page with "{{DISPLAYTITLE:{{SUBPAGENAME}} - Interface to Main Application and GUI}} :'''File''': DataSet.STX, linked to library STX.LIB :'''See also''': [[User_Guide/Workspace|Workspace]...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
File: DataSet.STX, linked to library STX.LIB
See also: Workspace, BDataSet

This macro implements a set of functions for the project management and for the communication with the main application shell DataSet (Workspace) and its GUI.

Workspace GUI Communication and Update

GetSelected

Usage
datasetcmd getselected type
type
selects from which part of the GUI selected elements should be retrieved
Result
An empty string or a simple table item containing the selected elements. The line format of the table depends on type
Description
This function retrieves attributes of elements selected in of the lists/regions of the workspace GUI.
type = sets
Get sets selected in the detail view of the workspace. The detail view displayes a list of sets, if an element of type Set (folder) or the root element (STXDataSet) is selected in the overview.
table entry format: elementTag ; elementID ; elementIRef [; srate ; channels [; soundfilepath]]
  • The values srate and channels are set for selected audio sets (AFile, ASequence)
  • The value soundfilepath is set only for audio sets of type AFile
type = segments
Get ASeg elements (segments) selected in the detail view of the workspace. The detail view displayes a list of segments, if an audio set (AFile, ASequence, ASegList) is selected in the overview.
table entry format: audioSetIRef ; segmentID ; segmentCH
type = parameters
Get APar elements (saved parameters) selected in the detail view of the workspace. The detail view displayes a list of parameters, if an audio set (AFile, ASequence, ASegList) is selected in the overview.
table entry format: audioSetIRef ; segmentID ; segmentCH ; aparMethod ; aparType
type = element
Get the element selected in the overview.
table entry format: elementTag ; elementIRef ; elementID
Example
 // process all selected segments
 if '$(#seglist := datasetcmd getselected segments)[?]' == table then
	for #i := 0 to $#i < $#seglist[] step #i := int $#i+1
		readtab $#seglist #aset';'#id';'#ch';'# /del
		
		// do something
		
	end
	delete $#seglist
 end

Uncommon Functions and Functions for internal use only

The following functions are not often used and not so important for user script programming. If you want to know more about these functions look at the comments in the source (file DataSet.stx, macro DataSetCmd).


  • ....

Navigation menu

Personal tools