Reference

# Module `view.DataSelector`

Widget that allows the user to select a data from a project. If the data array change, prepare() must be called.

## Functions

DataSelector.new () | Constructor.
DataSelector:clear () | Clears the DataSelector, also releasing references to the data.
DataSelector:get () | Gets the selected data.
DataSelector:prepare (data_array, filter) | Prepares the DataSelector for a new data array.
(private) DataSelector:build_gui () | Builds the interface.
(private) DataSelector:populate_model () | Populates the model with the data name and data index in the array.

## Functions

DataSelector.new ()
  Constructor. The real GTK+ widget is the field 'widget'.

  ### Return value:

  New instance of DataSelector
DataSelector:clear ()
  Clears the DataSelector, also releasing references to the data.
DataSelector:get ()
  Gets the selected data.

  ### Return value:

  The selected fann.Data
DataSelector:prepare (data_array, filter)
  Prepares the DataSelector for a new data array.

  ### Parameters

  - data_array: Data array to use
  - filter: Filter function that takes a fann.Data and return true or false, to accept or reject a fann.Data (optional).
(private) DataSelector:build_gui ()
  Builds the interface.
(private) DataSelector:populate_model ()
  Populates the model with the data name and data index in the array.