Reference for on_quit
Specify callback for when the sketch ends execution. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
Sound (future)
Style
System
on_quit
Text
Transform
Purpose
Register a callback for when the sketch terminates.
Snippet
Register a callback for end of sketch execution. This function should expect a single parameter which is the sketch quitting.
def callback(sketch_quitting): print('Quiting') sketch.on_quit(callback)
Parameters
- callback: The function to invoke when the sketch stops execution.
Availability
Available for Sketch2DApp and Sketch2DWeb. Note that, on web, only called if quit is explicitly invoked.