Bi Jane Jia created FLEX-34551:
----------------------------------
Summary: Incremental compile causes a "Variable xx is not defined"
error with embedded resource
Key: FLEX-34551
URL: https://issues.apache.org/jira/browse/FLEX-34551
Project: Apache Flex
Issue Type: Bug
Components: Compiler API
Affects Versions: Adobe Flex SDK 4.6 (Release)
Reporter: Bi Jane Jia
[Problem]
=========
The customer got "Variable xx is not defined" error when they compiled the
project.
More details are as below:
1. the customer found that the error will not show up without following code.
[Embed(source="/images/stopSign-icon.gif")]
public static var lc_stopSignIcon:Class;
2. the customer found that if they set incremental="false" in build.xml, the
error will not show up.
STEPS TO REPRODUCE:
===================
1. change following parameter to work path in build.xml.
base.dir
FLEX_HOME
ANT_HOME
2. run build_swf.bat.
3. modify src/Test.mxml. (add a new line)
4. run build_swf.bat again.
5. run flex/Test.swf, following error will show up.
ReferenceError: Error #1065: Variable CommonIcon_lc_stopSignIcon is
not defined.
at flash.display::MovieClip/nextFrame()
at
mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:278]
at
mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\managers\SystemManager.as:2627]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.preloaders::Preloader/timerHandler()[E:\dev\4.y\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
RESULT:
=======
compile error shows up
EXPECTED:
=========
no compile error
[System environment]
====================
Flex 4.6.0
apache-ant-1.8.0
use Ant to compile
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)