简体   繁体   English

flexUnit纯AS3 IntelliJ

[英]flexUnit pure AS3 IntelliJ

Is it possible to have FlexUnit 4.1 in IntelliJ with project set up as Pure AS3 which meens no Flex Runner. 是否可以在IntelliJ中安装FlexUnit 4.1,将项目设置为Pure AS3,而不使用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. 但是,如果我从模块设置中取消选中Pure AS3,一切正常。 The reason why I check pure AS3 is that I dont get Flex completion, and possible there are reasons that I still dont know. 我检查纯AS3的原因是我没有完成Flex完成,可能有理由我还不知道。

I assume your inspiration is running it on a continuous integration system like Hudson, Bamboo, or TeamCity. 我认为你的灵感是在像Hudson,Bamboo或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 看看这个FlexUnit Wiki: http ://docs.flexunit.org/index.php?title = Contontuous_Integration_Support

Makes sense. 说得通。 There are quite a few flex libs that get left out if you go with the pure actionscript option. 如果你使用纯actionscript选项,有很多flex libs被遗漏了。

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. 你几乎可以错过任何你想要的东西,以及一些利用mxml方法进行视觉方面的类。

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". 到现在为止,我猜你已经研究过并找到了你所缺少的课程,并将代码包装成不使用它们,但是也许别人抓住他们的眼睛会很高兴知道当你切换时IntelliJ排除了相当大的差异到“纯粹的动作”。

Of course the AS3 documentation won't really cover that AFAIK because the intent is that you will use both mxml and AS. 当然,AS3文档并不真正涵盖AFAIK,因为意图是您将同时使用mxml和AS。

I ran into the same problem in a pure AS3 environment. 我在纯AS3环境中遇到了同样的问题。 Adding: 添加:

-define+=CONFIG::useFlexClasses,false -define + = CONFIG :: useFlexClasses,假

in the module's compiler options and commenting out flex classes that might be imported worked for me. 在模块的编译器选项中,注释掉可能导入的flex类对我有用。

There might be a thrown error for mx.core.FlexVersion and so I just commented those lines out. mx.core.FlexVersion可能会抛出错误,因此我只是将这些行注释掉了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM