Prev | Current Page 308 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

More directories can be added using the addPath function. A
loaded module is always cached for performance reasons. The cache system uses the name of the loaded
module to identify it and it is possible to load a module more than once if different paths are provided.
The loaded module contains the class definitions that can be accessed using the reflection abilities of
haXe. The External class could be contained in a package or sub - package; in that case the syntax to
create an instance of it would be:
var ob = Type.createInstance(classes.myPackage.mySubPackage.External, []);
158
Part I: The Core Language
Neko .ndll
Neko .ndll s are shared libraries written in C that target the Neko platform (see Table 6 - 4 ). Essentially,
they are a bridge between the Neko run time and the C world. Writing an .ndll permits to wrap the
functionalities defined in some low - level libraries with direct access to the operating system. This happens
with .ndll that comes with the distribution and that can be found in the Neko installation directory.


Pages:
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320