Question

Is it possible to have FlexUnit 4.1 in IntelliJ with project set up as Pure AS3 which meens no Flex Runner.

What I get is an error

Error #1065: Variable mx.core::FlexVersion is not defined.
ReferenceError: Error #1065: Variable mx.core::FlexVersion is not defined.

But if I uncheck the Pure AS3 from module setting everything works. The reason why I check pure AS3 is that I dont get Flex completion, and possible there are reasons that I still dont know.

Was it helpful?

Solution

I assume your inspiration is running it on a continuous integration system like Hudson, Bamboo, or TeamCity.

You need a windowing environment, but there are some workarounds to provide one.

Look at this FlexUnit Wiki: http://docs.flexunit.org/index.php?title=Continuous_Integration_Support

OTHER TIPS

Makes sense. There are quite a few flex libs that get left out if you go with the pure actionscript option.

You pretty much miss out on anything you might have wanted from spark and a number of the classes that leverage mxml approaches to the visual side.

By now I'm guessing you have already researched and found the classes you were missing and wrapped the code to not use them, but perhaps someone else clawing out their eyes will appreciate knowing there is a fairly big difference in what IntelliJ excludes when you toggle to "pure actionscript".

Of course the AS3 documentation won't really cover that AFAIK because the intent is that you will use both mxml and AS.

I ran into the same problem in a pure AS3 environment. Adding:

-define+=CONFIG::useFlexClasses,false

in the module's compiler options and commenting out flex classes that might be imported worked for me.

There might be a thrown error for mx.core.FlexVersion and so I just commented those lines out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top