Re: [clj-processing] Checking for Sketch Stop/Exit

79 views
Skip to first unread message

Sam Aaron

unread,
Jun 14, 2012, 4:57:14 PM6/14/12
to clj-pro...@googlegroups.com
Hi there Philipp,

what are the different ways you might quit the sketch? Are you closing by hitting the close button on the app window itself?

Would a :on-quit handler in the sketch options do the job you want?

Sam

--
http://sam.aaron.name


On Thursday, 14 June 2012 at 21:01, Philipp Dikmann wrote:

> Hi,
>
> just starting out with Clojure & Quil, I recently started to incorporate sound using the minim library.
> Minims use requires explicit notice about the sketch stopping - missing such notice, it continues to play along merrily :)
>
> I remember a "stop" method in Processing, getting called when the sketch was quit (for whatever reason), which one could overload for that kind of purpose.
> Quil has "exit", which is fine when the sketch wants to end itself - but is there a way to check for the user quitting the sketch, yet?
>
> Best regards &
> Thanks for your time,
> Philipp



Philipp Dikmann

unread,
Jun 14, 2012, 6:26:34 PM6/14/12
to clj-pro...@googlegroups.com
Hi Sam,

closing with the close button on the app window is the main use case,
but I also notice that you can quit by pressing the escape key (same as in Processing)
or hitting the usual Alt-F4 / Command-Q keyboard shortcuts.

An :on-quit handler for cleaning up would be great, yes :)

Best regards,
Philipp
Reply all
Reply to author
Forward
0 new messages