Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Function.awake #5659

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 29 additions & 0 deletions HelpSource/Classes/Function.schelp
Expand Up @@ -369,6 +369,35 @@ method::protect

Executes the receiver. The cleanup function handler is executed with an error as an argument, or nil if there was no error. The error continues to be in effect.

subsection:: Scheduling


method:: awake

This method is called by a link::Classes/Clock:: on which the function was
scheduled when its scheduling time is up. It calls link::#-value::, passing
on the scheduling time in beats as an argument.

argument:: beats
The scheduling time in beats. This is equal to the current logical time
(link::Classes/Thread#-beats::).

argument:: seconds
The scheduling time in seconds. This is equal to the current logical time
(link::Classes/Thread#-seconds::).

argument:: clock
The clock on which the object was scheduled.

returns::
The value returned by the function's link::#-value::. A caller clock uses
this value to reschedule the function.

code::
// Runs every 2 seconds
AppClock.play({ "And again".postln; 2 });
::

subsection::Audio

method::play
Expand Down