Flex 4 - red code problem

Hi,

I have created a very simple HelloWorld app and compiled with Flex 4 SDK (last nightly build, but it is not relevant).
It compiles and runs just fine (so the code must be correct), but the editor shows some codes in red. E.g. if I create properties of primitive types, the types are red (Number, String, Boolean), the "click" for Button is also red and there is no code hinting for it.

screenshot_252.png

Another one: I was trying to use AdvancedDataGrid (copied the relevant swc files in the Flex SDK folder). Again, the app compiles and runs, but all code related to AdvancedDataGrid is red.

I haven't encountered these problems when using Flex 3 SDK.

Am I missing something, or is it an issue that still needs to be fixed?

PS.
I am using the 30 day trial of IntelliJ, tried both the last stable release and IntelliJ IDEA 9.0.2 EAP (build 94.426), as it is a fix there for a bug called "Good code red", but that seems to be something else.
I have found IntelliJ looking for an alternative to Flash Builder that runs on Linux. I really like IntelliJ, it has lots of really nice features and I would really like switching from Flex/Flash Builder, but I have a couple of problems, some of them are minor, but there are major ones too (like this red code), and I am not sure if it's just me not being able to set it up correctly or those are real problems.

11 comments

It looks like Flex 4 SDK changed location of playerglobal.swc another
time, we will adapt the change in IDEA build after 8 of March
In the meaning time use more stable build of Flex 4 SDK  or ensure that
Flex SDK have proper playerglobal.swc reference in SDK settings.
As to AdvancedDataGrid, it seems similar configuration issue, the
library swc should be in module dependencies.

On 07.03.2010 15:34, Andrea Varga wrote:

Hi,

>

I have created a very simple HelloWorld app and compiled with Flex 4 SDK (last nightly build, but it is not relevant).
It compiles and runs just fine (so the code must be correct), but the editor shows some codes in red. E.g. if I create properties of primitive types, the types are red (Number, String, Boolean), the "click" for Button is also red and there is no code hinting for it.

>

  Image:screenshot_252.png

>

Another one: I was trying to use AdvancedDataGrid (copied the relevant swc files in the Flex SDK folder). Again, the app compiles and runs, but all code related to AdvancedDataGrid is red.

>

I haven't encountered these problems when using Flex 3 SDK.

>

Am I missing something, or is it an issue that still needs to be fixed?

>

PS.
I am using the 30 day trial of IntelliJ, tried both the last stable release and IntelliJ IDEA 9.0.2 EAP (build 94.426), as it is a fix there for a bug called "Good code red", but that seems to be something else.
I have found IntelliJ looking for an alternative to Flash Builder that runs on Linux. I really like IntelliJ, it has lots of really nice features and I would really like switching from Flex/Flash Builder, but I have a couple of problems, some of them are minor, but there are major ones too (like this red code), and I am not sure if it's just me not being able to set it up correctly or those are real problems.

>

---
Original message URL: http://www.jetbrains.net/devnet/message/5258028#5258028



--
Best regards,
   Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Thank you for the quick reply!
Adding  dependencies to the swc files solved all errors.
I still find it interesting that the compilation worked even without these settings.

0

Andrea, this problem is already fixed in latest EAPs.
If you configure Flex SDK from scratch in IDEA 94.426 - all should be ok. Can you please confirm that?

0

Hi Alexander,
Unfortunately I cannot run the 94.426. I got the error: "Could not find agent library on the library path or in the local directory: yjpagent".
Currently I am using 94.273 and I had the same problem with that one too. I have downloaded another version of libyjpagent.so and it worked, but I cannot run 94.426 with any combination/version of libyjpagent.so/libyjpagent64.so (I am on 64 bit Ubuntu).
(Sorry for being a little offtopic)


0

You may just remove -agentlib... line from <IDEA installation>/bin/idea.exe.vmoptions.

But the issue was fixed even before 94.273... Do you insist that if you remove and create again Flex SDK in IDEA - SDK doesn't contain playerglobal.swc in its Classes tab? That's very strange. What swc files it does contain (you may attach a screenshot)?

Please check that:

1. <Flex SDK>/framework/flex-config.xml file contains
<target-player>10.0.0</target-player>
and
<external-library-path>
      <path-element>libs/player/{targetPlayerMajorVersion}.{targetPlayerMinorVersion}/playerglobal.swc</path-element>
</external-library-path>

2. file <Flex SDK>/frameworks/libs/player/10.0/playerglobal.swc exists.

0

I don't isist .
You are right, 94.273 is working corectly with the SDK that has playerglobal.swc in the right place and flex-config.xml as you described.
I had also an older version of the SDK (besides many others) that was creating the problems.
Sorry for the confusion. Being new to IDEA, I got a little lost between all the SDK and IDEA versions.
Thanks for the great support!

I still cannot run 94.426 though:

java.lang.ClassNotFoundException: com.intellij.ide.plugins.PluginManager
        at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:67)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at com.intellij.util.lang.UrlClassLoader.loadClass(UrlClassLoader.java:80)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at com.intellij.ide.Bootstrap.main(Bootstrap.java:41)
        at com.intellij.ide.Bootstrap.main(Bootstrap.java:35)
        at com.intellij.idea.Main.main(Main.java:54)

0

Try to download EAP once again, I suppose it could be downloaded incorrectly (you may check a digest).

0

Andrea,

I am using IU 94.426 with FlexSDK 3.3.00 on Ubuntu 09.10 64-bit without any problem.

-Alex

0

Second download is okay
Thanks a lot!

0

Just to be on topic , here is another red text (code compiles and runs without errors).
screenshot_266.png
The text becomes green if I set a valid file there. It seems that the value of "source" property is always required  to be a file, as it should be for some tags (Image), but not for all of them.
This does not seem to be a Flex SDK problem, but maybe it is.

(IU-94.425, FlexSDK4.0.0.13875)

0

Please sign in to leave a comment.