Reference 〉 Class
funcStore

Events()

An interface for storing Event objects and providing for their addition and removal. This class can be accessed through model.events, but should not be instantiated by user code. Individual Event objects may be accessed through this object as a dict using the name under which the event was registered, i.e. model.events[name].

Methods

Click a method name for more detailed documentation.

  • add( name, function, repeat, … )

    Registers an Event. When triggered, an event stores the data output at that time and registers on the visualizer. TimeSeries, for example, draws a vertical line on the plots (see the image to the right), and Charts will flash the background. In the image to the right there are two events, marking the increase and leveling off of population.

    This function is aliased by the @heli.event decorator, which is generally the preferred syntax.

  • clear( )

    Removes all registered events.

  • remove( name )

    Removes a previously added Event.

Static Properties

  • multi bool

    Whether the dict values should store a function, or a list of functions. This is a static property and should be changed only by subclassing funcStore.

    Initial value: False

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.

History