Packagecom.hippohx
Classpublic class Application
InheritanceApplication Inheritance HaxeBackendListener Inheritance flash.events.EventDispatcher

The Application class provides information such as executable's path, application's config xml, etc.



Protected Properties
 PropertyDefined by
 InheritedHAXE_BACKEND : String = ""
HAXE_BACKEND defines the ID that a Neko backend needs to use to call methods on this class (or the class extending this one).
HaxeBackendListener
Public Methods
 MethodDefined by
  
Do NOT call this constructor, please use getInstance method instead.
Application
  
Returns the full path of the folder in which the application is running.
Application
  
Returns the full path of your application's executable.
Application
  
getAppXML():XML
HippoHX's applications need a configuration xml file called app.xml which must be at the same level as the app.n file.
Application
  
getCmdLine():Array
Returns an array of strings with the parameters passed to your application.
Application
  
Returns the number of paramenters passed to your application.
Application
 Inherited
Returns HAXE_BACKEND API identifier.
HaxeBackendListener
  
[static] Use this method to retrieve an instance of the class, do NOT call the constructor directly.
Application
  
Quits application.
Application
Constructor detail
Application()constructor
public function Application()

Do NOT call this constructor, please use getInstance method instead.

See also

Method detail
getApplicationFolder()method
public function getApplicationFolder():String

Returns the full path of the folder in which the application is running. If you are planning to use this folder to store data, please read about storing data good practices first.

For Mac applications we tweak the path a little bit see Application path on Macs.

Returns
String
getApplicationPath()method 
public function getApplicationPath():String

Returns the full path of your application's executable. If you are planning to use this path to store data, please read about storing data good practices first.

Neko call is neko.Sys.executablePath().

For Mac applications we tweak the path a little bit see Application path on Macs.

Returns
String
getAppXML()method 
public function getAppXML():XML

HippoHX's applications need a configuration xml file called app.xml which must be at the same level as the app.n file.

You can add your own information to app.xml provided that you respect its basic format. Please take a look to the wiki for more information.

Returns
XML
getCmdLine()method 
public function getCmdLine():Array

Returns an array of strings with the parameters passed to your application.

Neko call is neko.Sys.args().

Returns
Array
getCmdLineArgCount()method 
public function getCmdLineArgCount():int

Returns the number of paramenters passed to your application.

Returns
int
getInstance()method 
public static function getInstance():Application

Use this method to retrieve an instance of the class, do NOT call the constructor directly. Note that you don't need to store the instance to access its methods, you can simply do this:

var appFolder:String = Application.getInstance().getApplicationFolder();

Returns
Application
quitApplication()method 
public function quitApplication():void

Quits application.

This method makes this calls on the backend:

swhxWindow.destroy();
swhx.Application.exitLoop();
swhx.Application.cleanup();