2 Replies Latest reply on Jun 6, 2006 12:14 PM by ntsiii

    Error: Definition UIComponent could not be found.....

    ntsiii Level 3
      I’ve corrected all my syntax problems and am down to this single error.

      In FB Problems panel:

      Description: Definition UIComponent could not be found. [CODEGEN C:\dev\Flex2\source\RandD\letest\Simplest_UI_DEBUG.mxml]
      Resource: “letest”, which is the name of the source code folder, the name of the workspace and the name of the project.
      In Folder: column/field is empty.
      Location: “line 15”

      Any clue what this is saying? Where can I go from here?

      Tracy
        • 1. Re: Error: Definition UIComponent could not be found.....
          Level 7
          Hi, ntsiii wrote:
          > Description: Definition UIComponent could not be found. [CODEGEN
          > C:\dev\Flex2\source\RandD\letest\Simplest_UI_DEBUG.mxml]
          > Resource: ?letest?, which is the name of the source code folder, the
          > name of the workspace and the name of the project.
          > In Folder: column/field is empty.
          > Location: ?line 15?
          >
          > Any clue what this is saying? Where can I go from here?

          That's strange. Does it persist if you do Project > Clean? Can you
          post the contents of Simplest_UI_DEBUG.mxml?

          --
          nj
          Flex Builder team
          • 2. Re: Error: Definition UIComponent could not be found.....
            ntsiii Level 3
            Yes, it persists after Clean. Here is the source for that file. You will see it is a bit unusual, as I use another component as the root tag. That component is a generated mxml component that contains a lot of logic. This app is actually a debugger for that component.

            Tracy

            <?xml version="1.0" encoding="utf-8"?>
            <LogicEngine_Simplest
            xmlns:ltui="UIComponents.*"
            width="950" height="700"
            backgroundColor="#FFFFFF"
            horizontalAlign="left" xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*"
            paddingLeft="0" paddingRight="0" paddingTop="0"
            creationComplete="initComponent()">

            <mx:Script><![CDATA[
            import LEComponents.*;
            [Embed("../lt/assets/treeA.gif")] var icoA:Class;
            [Embed("../lt/assets/treePG.gif")] var icoPG:Class;
            [Embed("../lt/assets/treeP.gif")] var icoP:Class;
            [Embed("../lt/assets/treeRQ.gif")] var icoRQ:Class;
            [Embed("../lt/assets/treeRL.gif")] var icoRL:Class;
            [Embed("../lt/assets/treeRE.gif")] var icoRE:Class;
            [Embed("../lt/assets/treeRR.gif")] var icoRR:Class;
            [Embed("../lt/assets/treeDG.gif")] var icoDG:Class;
            [Embed("../lt/assets/treeDS.gif")] var icoDS:Class;
            [Embed("../lt/assets/treeDQ.gif")] var icoDQ:Class;
            [Embed("../lt/assets/treeSG.gif")] var icoSG:Class;
            [Embed("../lt/assets/treeS.gif")] var icoS:Class;
            [Embed("../lt/assets/treeF.gif")] var icoF:Class;
            [Embed("../lt/assets/treeUG.gif")] var icoUG:Class;
            [Embed("../lt/assets/treeUI.gif")] var icoUI:Class;
            [Embed("../lt/assets/treeUA.gif")] var icoUA:Class;
            [Embed("../lt/assets/treeNA.gif")] var icoNA:Class;

            var sURLXMLDebugTree:String = "LEDebugTree_Simplest.xml";
            var xmlTemp:XMLDocument;

            var sSuperClassName:String = "Application";
            var leLogicEngine:LogicEngine = LTLogicEngine;

            public function initComponent():void
            {
            mxdsDebugTree.send();
            //xmlTemp = new XMLDocument();
            //xmlTemp.ignoreWhite = true;
            //xmlTemp.onLoad = onDebugTreeLoad;
            //xmlTemp.load(sURLXMLDebugTree);
            leLogicEngine = LTLogicEngine;
            pdbui._LEC = this;
            }//initComponent




            private function onDebugTreeLoad(event:Event):void
            {
            leLogicEngine.parameterXML = xmlTemp;
            expandAll(trDebugNav.dataProvider, trDebugNav, 2, 0);
            }

            public function setDebugParameter(oEvent):void
            {
            var treeNodeSelected = oEvent.target.selectedNode
            var sIdParameter = treeNodeSelected.attributes.Id;
            pdbui.parameterId = sIdParameter;
            }//setDebugParameter

            public function calcDependents(bOverride:Boolean):void
            {
            leLogicEngine.calcDependents(true);

            }//setDebugParameter

            public function treeIconFunction(item):Class
            {
            var sNodeName:String;
            sNodeName = fnSplitNodeName(item.nodeName);

            switch (sNodeName)
            {
            case 'Application':
            return icoA;
            case 'ParameterGroup':
            return icoPG;
            case 'Parameter':
            return icoP;
            case 'Rulequery':
            return icoRQ;
            case 'Ruleliteral':
            return icoRL;
            case 'Rulerange':
            return icoRR;
            case 'Ruleexpression':
            return icoRE;
            default:
            return icoNA;
            }
            }//treeIconFunction

            function fnSplitNodeName(sNodeName:String):String
            {
            if (sNodeName.indexOf(':') >= 0)
            {
            sNodeName = sNodeName.split(':')[1];
            }
            return sNodeName;
            }


            /* displays the childnodes of the specified tree not to the specifice depth
            oTreeNode: The desired data node of the tree. Can be xml or TreeNode object. The root expands the whole tree
            oTree: The tree control itself
            iDepthMax: Number, specifies how many levels to expand. -1 expands all levels
            iDepth: Number, starting depth, always use 0.

            example call:
            expandAll(dsParameterTree, trParameterNav, 2, 0)
            */
            function expandAll(oTreeNode:Object, oTree:Object, iDepthMax:Number=-1, iDepth:Number=0):void

            {
            if ( iDepthMax == -1 || iDepth < iDepthMax ) //we are less than the max depths or there is no max
            {
            var iDepthNew:Number = iDepth + 1;
            oTree.setIsOpen(oTreeNode, true, false , false);
            var aChildren:Array = oTreeNode.getChildNodes();
            for (var i = 0; i < aChildren.length; ++i)
            {
            expandAll(aChildren ,oTree,iDepthMax,iDepthNew);
            }
            }
            }//expandAll

            ]]></mx:Script>

            <mx:HTTPService id="mxdsDebugTree" url="{sURLXMLDebugTree}" result="onDebugTreeLoad(event)" />
            <mx:HDividedBox id="hdDebug" width="{this.width}" height="{this.height-30}">
            <!-- Debug Navigation -->
            <mx:Canvas id="caDebugNav" width="{hdDebug.width / 4 * 1 + 15}" height="{hdDebug.height}">
            <mx:Panel id="paDebugNav" width="{caDebugNav.width}" height="{caDebugNav.height}"
            title="Debugger Navigation">
            <mx:Tree id="trDebugNav" dataProvider="{leLogicEngine.parameterXML}"
            itemRenderer="UIComponents.LTParameterTreeRenderer2"
            width="{paDebugNav.width - 15}" height="{paDebugNav.height - 70}"
            labelField="Name"
            borderStyle="none" defaultLeafIcon="UIComponent" folderOpenIcon="UIComponent" folderClosedIcon="UIComponent"
            iconFunction="treeIconFunction"
            change="setDebugParameter(event);">
            </mx:Tree>
            <mx:LinkButton label="Calc All Dependencies" click="calcDependents(true);" />
            </mx:Panel>
            </mx:Canvas>
            <ltui:ParameterDebugUI id="pdbui" width="100%" height="{hdDebug.height}" backgroundColor="#FFFFFF"/>
            </mx:HDividedBox>


            </LogicEngine_Simplest>