Flex 4 inspection problem (should be simple).

Hi,

I'm having trouble with a Flex 4 project.  I use flexmojos and have followed these instructions:

http://blogs.jetbrains.com/idea/2009/09/flexmojos-inmaia/

When I create a new Flex component using Flash Builder, this is the file it creates (I'm using it as an example and open it in IDEA):

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/halo" width="400" height="300">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
</s:Group>


It seems like whenever I use a Spark component as the top level container the <fx:Declarations> tags are underlined in red and give the error:

Element fx:Declarations is not allowed here


Using a Halo component as the top level container works fine:


<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/halo" width="400" height="300">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
</mx:VBox>


Both compile without error.  Since it's a very simple .mxml file I assume I am doing something wrong.  Any ideas?

Ryan

2 comments
Comment actions Permalink

Seems to be a bug.

Ryan J wrote:

Hi,

I'm having trouble with a Flex 4 project.  I use flexmojos and have followed these instructions:

http://blogs.jetbrains.com/idea/2009/09/flexmojos-inmaia/

When I create a new Flex component using Flash Builder, this is the file it creates:

>           xmlns:s="library://ns.adobe.com/flex/spark" 
>          xmlns:mx="library://ns.adobe.com/flex/halo" width="400" height="300">
>     
>         >     
> 
> ]]>


It seems like whenever I use a Spark component as the top level container the <fx:Declarations> tags are underlined in red and give the error:

 ]]>


Using a halo component as the top level container works fine:

 
>           xmlns:s="library://ns.adobe.com/flex/spark" 
>          xmlns:mx="library://ns.adobe.com/flex/halo" width="400" height="300">
>     
>         >     
> ]]>


Both compile without error.  Since it's a very simple .mxml file I assume I am doing something wrong.  Any ideas?

Ryan

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



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

0
Comment actions Permalink

Thank you for your feedback. I've opened an issue for that http://youtrack.jetbrains.net/issue/IDEADEV-41820
Tht fix will be available in the next EAP.

0

Please sign in to leave a comment.