jeremy-wischusen / gaforflash

Automatically exported from code.google.com/p/gaforflash
Apache License 2.0
0 stars 0 forks source link

Error #1065: Variable is not defined. with Flex 4 Application #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Add FlexTracker mxml component to an existing Flex 4 project
2. Configure the project to not use RSL but use merged code
3. Run the project/application

Then we got Error #1065: Variable is not defined and the application is not 
running at all.

Original issue reported on code.google.com by Oakman...@gmail.com on 24 Jun 2010 at 9:17

GoogleCodeExporter commented 9 years ago
I found a *temporary" fix for this issue. In the constructor of FlexTracker:

change 
var appclass:Object = getDefinitionByName( "mx.core::Application" );
_app = appclass.application;

into
_app = FlexGlobals.topLevelApplication;        

This can fix the issue, but I don't think it's the best way, because the 
component will then stop working with Flex 3 Project.    

Original comment by Oakman...@gmail.com on 24 Jun 2010 at 9:22

GoogleCodeExporter commented 9 years ago
yes we are aware of this problem see issue 66 (and the patch).

feel free to fix it as you want in your code, but for our case
we can not use directly "FlexGlobals.topLevelApplication"
as it would create a hard dependency on FlexGlobals, and
so people not using Flex then would be stuck.

Original comment by zwetan on 14 Oct 2010 at 8:00