Events and Actions
Add reset button
- Drag the Button widget from the Blocks palette to the right of the second range, so that it is inserted below this range.
- Name the button "Reset simulation"
Configure reset model action
- Click the button to select it.
- Set the mode of the button to the "Button triggers an event" option in the Mode section.
- Click "Add event" in the Events section.
- Select the "On-click" event.
- Select the "Reset model" action to be triggered.
- Select the "Lissajous" model so that the action is performed on it.
- Preview the simulator
- the button restsarts the model but
- mr. Wrong Wrongstein Wrongington – an action to reset chart must be added.
Create action - clear chart
- Drag the action widget from the Blocks palette to the canvas.
* Name the action "Clear chart" * Write "Removes traces from chart" to the Description
write code
chart.clear()
connect with button
The project in the current stage may be downloaded here and the simulator is: