Deprecated: Return type of ResultWrapper::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 174

Deprecated: Return type of ResultWrapper::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 192

Deprecated: Return type of ResultWrapper::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 185

Deprecated: Return type of ResultWrapper::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 202

Deprecated: Return type of ResultWrapper::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 163

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 104

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 104

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 105

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 105

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 106

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 106

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/skins/SkinTemplate.php on line 313

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104
Events and updates - Rave Documentation

Events and updates

From Rave Documentation
(Redirected from Events and Updates)
Jump to: navigation, search

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:



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).

This is different from just about every other function in Rave, which passes data using guidata(). 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).

The only exceptions to this rule are the functions raveupdateanalysis, raveupdatedataset and raveupdateexploremethod themselves. These functions will call guidata after they finish running IF they are not called with any outputs. I.e. if you type "handles = raveupdateanalysis(...)" then raveupdateanalysis will not update the guidata (since you asked for it as an output presumably you are going to do that yourself later, or immediately pass the new handles to another call of raveupdateanalysis.)

These exceptions work just fine AS LONG AS you never call guidata(handles.fig,handles) within any other update function. Putting guidata(handles.fig,handles) in an update function can cause bugs that are very hard to track down. So don't do it!


Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37