Declaration of worker:Worker stops application
If you have a simple Air mxml main file like so
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
]]>
</fx:Script>
</s:WindowedApplication>
You get an empty window.
However, if you have the same main mxml file like this, you get absolutely nothing, no errors or traces.
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private var worker:Worker;
]]>
</fx:Script>
</s:WindowedApplication>
I'm not too sure why a declaration of a non referenced worker variable stops the app from showing itself (shouldn't it be optimized out and ignored when creating the bytecode ?). I am using Flashbuilder 4.7 with the 3.5 SDK.
