Anyone using Flex-Mojos + Intellij seeing errors on things that are not errors?

I am building a clients code and they use quite a few references like this:
<mx:Binding source="orgTree.selectedBuilerTier as BuilderTierCVO" destination="this.selectedBuilerTier"/>

The this.selectedBuilerTier and orgTerr.selectedBuilerTier shows up as an error, when in fact they compile just fine.

Thoughts? Anyone aware of a bug that relates to this? It results in a "Unresolved variable or type..." error.

3 comments
Comment actions Permalink

Thank you for feedback,
this seems to be a bug in IDEA (though not flexmojos-related).
Can you please paste full code snippet (what I'm interested in is declarations of orgTree and selectedBuilerTier fields/getters/setters).
I've reproduced red but copilable code in destination attribute, but couldn't do it for source attribute. I used following code (HelloWorld.mxml file):

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Binding source="h.a as String" destination="this.b"/>

    <mx:Script><![CDATA[
        [Bindable]
        private var h:HelloWorld;
        [Bindable]
        private var a:String;
        private var b:String;
]]></mx:Script>
</mx:Application>

Here I see 'this' and 'b' red, but 'h.a' is green. What is different in your code?

0
Comment actions Permalink

Here is the org tree. It is a Canvas with an AdvancedDataGrid on it.

<detailsOrgTree:AdminOrgTreeComponent id="orgTree"
                    width="100%" height="100%"
                    orgTierHD="{this.orgTierHD}"
                    builderAccount="{this.builderAccount}"/>

The variables in that component that are being bound:

            private var _orgTierHD : HierarchicalData;
            [Bindable]
            public function get orgTierHD() : HierarchicalData
            {
                return _orgTierHD;
            }
            public function set orgTierHD(hd : HierarchicalData) : void
            {
                _orgTierHD = hd;
                organizationTierTree.expandAll();
                organizationTierTree.invalidateList();
                
            }
            
            private var _selectedBuilerTier : BuilderTierCVO;
            [Bindable]
            public function get selectedBuilerTier() : BuilderTierCVO
            {
                return _selectedBuilerTier;
            }
            public function set selectedBuilerTier(t : BuilderTierCVO) : void
            {
                _selectedBuilerTier = t;
            }


In the class that has the OrgTree component is a corresponding selectedBuilderTier variable/getter/setter - seen below:

[Bindable]
        public function get selectedBuilerTier() : BuilderTierCVO
        {
            return _selectedBuilerTier;
        }
        public function set selectedBuilerTier(t : BuilderTierCVO) : void
        {
            _selectedBuilerTier = t;
            
            if ((t != null) && (builderAccount != null))
            {
                 this.selectedTierLabel = t.depthName; //builderAccount.tierDepthName(t.depthNameId);
                 if (t.parent != null)
                 {
                     this.selectedTierParentLabel = t.parent.depthName; //builderAccount.tierDepthName(t.parent.depthNameId);
                 }
            }
        }

Huge thanks for having a look at this. Do you know if there is a bug open for this sort of thing yet?

0
Comment actions Permalink

I still see error only in destination tag. I've opened an issue for that http://youtrack.jetbrains.net/issue/IDEA-51990
Please try latest EAP: http://www.jetbrains.net/confluence/display/IDEADEV/Maia+EAP Is source attribute still red there?
Can you please attach related files fully or try to create minimal project where the issue is reproduced?

0

Please sign in to leave a comment.