Events and updates
Contents
Introduction
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:
- raveupdateanalysis
- raveupdatedataset
- raveupdateexploremethods
- raveduplicatedataset - makes a copy of a data set. Note that [[[data set links]]] do NOT get copied, so if you want them to copy you must code that after you call this function. The duplicated data set also will not be linked back to the original data set's source file and will have its data source type recorded as "raveoriginated".
- raveduplicatevariable
- raveappendrows - appends one or more rows to a dataset, and then calls raveupdatedataset.