Warning: Parameter 1 to SyntaxHighlight_GeSHi::configureParser() expected to be a reference, value given in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/Hooks.php on line 207

Warning: Parameter 1 to SyntaxHighlight_GeSHi::resourceLoaderRegisterModules() expected to be a reference, value given in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/Hooks.php on line 207
Events and updates - Rave Documentation

Events and updates

From Rave Documentation
Revision as of 14:38, 16 October 2014 by Admin (Talk | contribs) (Coding Update Functions)

Jump to: navigation, search


This page lists the "events" that are defined in Rave that cause some object(s) on the workspace or data sets to need to be updated. If you are using Rave, you generally don't need to worry about these... they will be happening in the background whenever you interact with your data. If you are coding Rave plugins, you need to understand when to alert other objects that an event has occurred.

In the lists below, events are named according to their Rave keywords, which correspond to the information being updated (for analysis updates) or the way in which the data set has changed (for data set updates).

Analysis Events

  • isselected - A change to which rows are currently selected.
  • visiblerows - A change to which rows are currently visible.
  • rowcolors - A change to the row colors.
  • xdials - A change to a variable's current value. This event can take an optional parameter defining which variable's value has changed.
  • isfiltered - A change to the filter values.
  • constraints - A change to an existing constraint.

Data Set Events

  • targets - A change to the targets.
  • addrows - Rows have been added to the data set.
  • replaceall - The data set has been replaced completely, or otherwise changed so drastically that it should be treated as entirely new.
  • datachanged - Data values have changed, but the number of rows (and their "identity") has not changed.
  • removerows - Rows have been removed from the data set.
  • preferences - A change to the preferences. NOTE: This event should only be used by objects that need to update in response to changes in the preference values themselves, NOT to changes in the data that result from a change in preferences. Use datachanged in that case. (Generally changing preferences will trigger both a preferences and a data changed event.)

Coding Events in a Workspace Object

Helper Functions

These functions can be used to simplify event coding. Whenever possible, you should use these functions instead of coding your own solution:

Coding Update Functions

This is important. Update functions (anything whose filename starts with "raveupdate") should NEVER call guidata(handles.fig,handles). Instead they must pass the updated handles as an output of the function back to whatever called the update function (presumably either raveupdateanalysis or raveupdatedataset or raveupdateexploremethod, but could be something else).

Putting guidata(handles.fig,handles) in an update function can cause bugs that are very hard to track down. So don't do it!

This system was implemented because guidata is very slow, and update functions usually get called very frequently, many times in a row (since every workspace object may run one or more update functions in response to every user action).