If only one value is returned, sig_prms will be
of the type of that value, whereas if more than one item is returned, sig_prms will be an array. Despite
this, sig_types will always be an array of one or more items.
The third item in the returned event object is the sender property. This value is merely a returned
reference to data that was passed into the event construction when it is initially set up. Now, normally,
this value will be a pointer to the object that made the event, thus providing a simple means to work out
who fired the event. However, one could quite literally store anything they liked into this parameter, so
feel free to use it as you see fit.
Figure 17-8
Chapter 17: Desktop Applications with Neko
503
Following is an example of an event handler in use:
import gtk.Gtk;
class Events
{
public static var signal = neko.Lib.load(???hxGtk???,???hxs_closure_connect???,4);
public static function main()
{
var events = new Events();
}
public function new()
{
Gtk.init();
var win = Gtk.
Pages:
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934