Hi all,
I was just going through mailing list posts i found word “callbacks” .
was wondering whats a callback.
I’ll appreciate if someone tells me what exactly one means by this.
regards
gaurav.
Hi all,
I was just going through mailing list posts i found word “callbacks” .
was wondering whats a callback.
I’ll appreciate if someone tells me what exactly one means by this.
regards
gaurav.
On 11/28/06, gaurav bagga [email protected] wrote:
I was just going through mailing list posts i found word “callbacks” .
was wondering whats a callback.
A callback is a callable object passed as an argument to a method.
This is often needed in event oriented programming. For exemple, when
building a GUI, whenever you instantiate a button you need to pass to
the constructor a method to be invoked when the button is clicked.
In Ruby, procs can be used for callbacks. You can find examples of
this in the Pickaxe Book, in this chapter:
http://www.rubycentral.com/book/ext_tk.html
HTH.
Cheers,
Luciano
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs