Compiler errors when using Spark Only dependencies

Hello...

I'm working on a typical Flex application which is free of mx components and since 11.1 provides powerfull options for the build configurations, I started experimenting with them.

My first and most important issue is two compiler errors I'm getting when I use the Spark Only option.

The errors are :

ProjectName_FlexInit-generated.as: Access of undefined property ButtonAccImpl in package mx.accessibility.
ProjectName_FlexInit-generated.as: Definition mx.accessibility:ButtonAccImpl could not be found.

Both are fixed if I add manually the mx.swc dependency but the whole point was to optimize the code completion and the build so I'm wondering if I'm doing something wrong here.
The same configuration seems to be working in Flash Builder.


Also, a kinda related question is if it is possible to make the flex dependencies (and maybe other libs as well) be built as different swf files and not merged into the final application. It would speed up the deployment since the sdk swf files would be uploaded
only if the sdk would change.

Thanks in advance.

4 comments
Comment actions Permalink

Hi,
To analyze mx.accessibility:ButtonAccImpl problem you can check 'Keep generated ActionScript' option at the Compiler Options tab of the build configuration and look at the generated source - why this class is referenced. Or you can attach here a sample project and I'll analyze myself.

As for the second question: classes from SDK are not merged into your swf if Framework linkage is set to 'Runtime shared library' (RSL).
Do you mean that you also want to use your custom library as an RSL? Unfortunately there's no convenient way to do this (vote for http://youtrack.jetbrains.com/issue/IDEA-80149).
Or you mean that application SWF loads other SWFs at run time (i.e. Runtime-Loaded Modules, RLMs)? Yes IntelliJ IDEA Flash build configuration may have special 'RLM' output type and other build configuration (applications) may depend on RLM-build configurations that means that corresponding SWFs will probably be loaded at run time.

0
Comment actions Permalink

This specific class is being used in the generated as file indeed.

The file contains the following import import mx.accessibility.ButtonAccImpl;
and the following if statement

if (Capabilities.hasAccessibility) {
          spark.accessibility.ButtonBarBaseAccImpl.enableAccessibility();
          spark.accessibility.SliderBaseAccImpl.enableAccessibility();
          spark.accessibility.SpinnerAccImpl.enableAccessibility();
          spark.accessibility.NumericStepperAccImpl.enableAccessibility();
          spark.accessibility.DataGridAccImpl.enableAccessibility();
          spark.accessibility.ButtonBaseAccImpl.enableAccessibility();
          spark.accessibility.VideoPlayerAccImpl.enableAccessibility();
          spark.accessibility.ListBaseAccImpl.enableAccessibility();
          spark.accessibility.ToggleButtonAccImpl.enableAccessibility();
          spark.accessibility.RadioButtonAccImpl.enableAccessibility();
          spark.accessibility.ComboBoxAccImpl.enableAccessibility();
          spark.accessibility.TabBarAccImpl.enableAccessibility();
          spark.accessibility.RichEditableTextAccImpl.enableAccessibility();
          spark.accessibility.TextBaseAccImpl.enableAccessibility();
          spark.accessibility.TitleWindowAccImpl.enableAccessibility();
          spark.accessibility.PanelAccImpl.enableAccessibility();
          spark.accessibility.ListAccImpl.enableAccessibility();
          spark.accessibility.CheckBoxAccImpl.enableAccessibility();
          mx.accessibility.ButtonAccImpl.enableAccessibility();
          spark.accessibility.DropDownListBaseAccImpl.enableAccessibility();
          mx.accessibility.UIComponentAccProps.enableAccessibility();
       }

The problem is I'm trying to find where I might have a missed an mx declaration or import in my project and I cant find any (besides the events,states, etc). So there is no mx.controls declaration in mxml or actionscript.
Any other class usages that might need this class?

Regarding the second question, I just voded to the bug page.

0
Comment actions Permalink

Can you please try to create minimal mxml file that reproduces the issue? I need to find out why the same thing works in FB but doesn't work in IntelliJ IDEA. Is it web-targeted app? What Flex SDK version?

0
Comment actions Permalink

After your reply I've tried removing every dependency I had to the project and start adding them and try building after each one. It seems there was a Flash Pro generated swc which used Flex code for a custom component.
The problem was this swc. The funny thing is that this was a legacy and not-needed library so I'm terribly sorry if I caused too many headaches Alexander. :)
Our Flash SWC files usually contain simple movie clips but this one seems to have been generated in another way.
It's fixed and working now but I'm still wondering why it was built correctly in Flash Builder.

Thanks anyway.

0

Please sign in to leave a comment.