Prev | Current Page 947 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

dropTarget = true;
window.onFilesDropped = function( files : Array < String > )
{
if ( files.length > 0 )
{
for ( i in files )
{
neko.Lib.print( i );
}
}
return true;
}
Custom Events with Message Hooks
The aforementioned events cover a number of the native event types supported by the window as
handled by the operating system. However, any veteran C/C++ coder will know that an operating
system ??™ s event queue supplies a staggering number of event types that can normally be caught and dealt
with should the need arise. While not being able to supply handlers to absolutely every single event type
available, the SWHX library does provide a means to trap specific events through a proxy, so that code
supplied in the Neko layer can be called when such an event is fired. What ??™ s more, the numeric message
parameter variables existent in such event queue handler methods can be acquired in the Neko layer for
analysis. This proves invaluable in situations such as handling the results of a menu selection, for
example.


Pages:
935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959