This is my code in a simpler way:
In my main MXML:
private var applicationData:AppData = AppData.getInstance();
My AppData Class
package {
public class AppData {
private static var instance:AppData;
public function AppData(caller:Function) {
super();
if (caller != AppData.getInstance)
throw new Error("This class is a Singleton and can not be instantiated: Use the .getInstance() method!!");
}
public static function getInstance():AppData {
if (!instance)
instance = new AppData(arguments.callee);
return instance;
}
}
}
arguments.callee cause a crash in the Release Build (just stop to splash screen), not in the Debug Version.
It is possible to log this kind of error?
You can download the latest AIR SDK from : http://www.adobe.com/devnet/air/air-sdk-download.html
And yes, you need to be in the adl directory from terminal, which is the same as the adt directory or you may use the complete path of adl from wherever you are running your app from.
try using ./adl
You need to overlay the SDK over the Flex SDK:
http://helpx.adobe.com/x-productkb/multi/how-overlay-air-sdk-flex-sdk. html
Please send me your minimal project, which reproduces the issue at: neh@adobe.com
North America
Europe, Middle East and Africa
Asia Pacific