Prev | Current Page 918 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

If the function does exist, then a link to the function in C is created and
executed, along with any parameters. A call to the call function would look a little like this:
var wnd = Gtk.call.windowNew([TOPLEVEL]);
The parameters in this function call are passed within an array construct. This way, you can pass as
many parameters as are required by the called function, and Neko will deal with it appropriately. In the
case of the preceding example, the passed parameter is a value of the WindowType enumerator. You can
find this, and other enumerators for other functions, within the Gtk class. If you find yourself in a
position where an enumerator for a particular object is not available, feel free to add it to the class
yourself and support the hxGtk user community.
As you can see in the example, the function you ??™ re calling is called windowNew . The haXe language uses
this function name and resolves it within a generic function built to handle any name appended to
Gtk.call . In this instance, the appended name is converted to lowercase and has the string hx_gtk
prepended to the beginning of it, which will mean that, in the current circumstance, windowNew will
resolve to hx_gtkwindownew .


Pages:
906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930