4 Replies Latest reply on Sep 16, 2010 5:48 PM by ssardar

    ReferenceError: Error #1065: Variable  is not defined.

    ssardar

      Anyone know what this error means??  It happens when I add any additional item into my current viewstate.  It doesn't seem to matter what I add, but it does this.  I am adding in design mode, and I have 6 view states defined.  It's just easier to do it this way.  Is this some clash with naming?  Id'ing? Or is there a limitation on how many items can be added to a panel??  Please help if you have seen this before.  Thanks.

       

       

       

       

       

      ------------------------------------------------------------------------------------------ -------------------------------------------------------------------

       

       

       

      ReferenceError: Error #1065: Variable  is not defined.
      at global/flash.utils::getDefinitionByName()
      at mx.utils::DescribeTypeCache$/describeType()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\utils\DescribeTypeCache.as:95]
      at mx.utils::ObjectUtil$/getClassInfo()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\utils\ObjectUtil.as:829]
      at mx.controls::DataGrid/generateCols()[C:\autobuild\3.2.0\frameworks\projects\framework\src \mx\controls\DataGrid.as:2409]
      at mx.controls::DataGrid/collectionChangeHandler()[C:\autobuild\3.2.0\frameworks\projects\fr amework\src\mx\controls\DataGrid.as:4151]
      at mx.controls.listClasses::ListBase/set dataProvider()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\listClass es\ListBase.as:1827]
      at mx.controls::DataGrid/set dataProvider()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\DataGrid. as:1336]
      at mx.core::Container/createComponentFromDescriptor()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\core\Container.as:3595]
      at mx.core::Container/createComponentsFromDescriptors()[C:\autobuild\3.2.0\frameworks\projec ts\framework\src\mx\core\Container.as:3493]
      at mx.containers::Panel/createComponentsFromDescriptors()[C:\autobuild\3.2.0\frameworks\proj ects\framework\src\mx\containers\Panel.as:1528]
      at mx.core::Container/createChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\ mx\core\Container.as:2589]
      at mx.containers::Panel/createChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\sr c\mx\containers\Panel.as:1056]
      at mx.core::UIComponent/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx \core\UIComponent.as:5370]
      at mx.core::Container/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\c ore\Container.as:2526]
      at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.2.0\frameworks\pro jects\framework\src\mx\core\UIComponent.as:5267]
      at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.2.0\frameworks\pro jects\framework\src\mx\core\Container.as:3305]
      at mx.core::Container/addChildAt()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\c ore\Container.as:2217]
      at mx.core::Container/addChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\cor e\Container.as:2140]
      at mx.core::Container/createComponentFromDescriptor()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\core\Container.as:3681]
      at mx.core::Container/createComponentsFromDescriptors()[C:\autobuild\3.2.0\frameworks\projec ts\framework\src\mx\core\Container.as:3493]
      at mx.core::Container/createChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\ mx\core\Container.as:2589]
      at mx.core::UIComponent/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx \core\UIComponent.as:5370]
      at mx.core::Container/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\c ore\Container.as:2526]
      at mx.core::Application/initialize()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx \core\Application.as:846]
      at modtest/initialize()[C:\Documents and Settings\d47112.SOLAR\My Documents\Flex Builder 3\Tester\src\modtest.mxml:0]
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\3.2.0\frameworks\pro jects\framework\src\mx\managers\SystemManager.as:2009]
      at mx.managers::SystemManager/initializeTopLevelWindow()[C:\autobuild\3.2.0\frameworks\proje cts\framework\src\mx\managers\SystemManager.as:3234]
      at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:\autobuild\3.2.0\framework s\projects\framework\src\mx\managers\SystemManager.as:3064]
      at mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.2.0\frameworks\projects\fram ework\src\mx\managers\SystemManager.as:2916]

       

       

       

       

       

       

      I included my MXML as there is no code yet, I am just trying to get the screen working first.

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application

       

       

      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" height="477">

       

       

      <mx:states>

       

      <mx:State name="addGroup">

       

      <mx:AddChild position="lastChild">

       

      <mx:Panel x="36" y="141" width="318" height="143" layout="absolute" title="Add/Edit">

       

      <mx:Button x="223" y="76" label="Cancel" click="{currentState=''}"/>

       

      <mx:Button x="150" y="76" label="Save"/>

       

      <mx:TextInput x="80" y="10" width="208"/>

       

      <mx:TextInput x="80" y="40" width="208"/>

       

      <mx:Label x="10" y="12" text="Group: "/>

       

      <mx:Label x="10" y="42" text="Description: "/>

       

      </mx:Panel>

       

      </mx:AddChild>

       

      </mx:State>

       

      <mx:State name="addRole">

       

      <mx:AddChild position="lastChild">

       

      <mx:Panel x="36" y="303" width="318" height="143" layout="absolute" title="Add/Edit">

       

      <mx:Button x="223" y="76" label="Cancel" click="{currentState=''}"/>

       

      <mx:Button x="150" y="76" label="Save"/>

       

      <mx:TextInput x="80" y="10" width="208"/>

       

      <mx:TextInput x="80" y="40" width="208"/>

       

      <mx:Label x="10" y="12" text="Role: "/>

       

      <mx:Label x="10" y="42" text="Description: "/>

       

      </mx:Panel>

       

      </mx:AddChild>

       

      </mx:State>

       

      <mx:State name="templateQuick">

       

      <mx:SetProperty target="{combobox1}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label1}" name="visible" value="false"/>

       

      <mx:SetProperty target="{apDG}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button34}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button35}" name="visible" value="false"/>

       

      <mx:SetProperty target="{combobox2}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label2}" name="visible" value="false"/>

       

      <mx:AddChild position="lastChild">

       

      <mx:Panel id="apCET" title="Create/Edit Template" width="332" height="412" layout="absolute" visible="true" verticalScrollPolicy="off" horizontalScrollPolicy="off" x="152" y="43">

       

       

      <mx:Button x="137" y="318" width="80" label="Save" id="button2"/>

       

      <mx:Button x="225" y="318" width="80" label="Cancel" click="{currentState=''}" id="button1"/>

       

      <mx:Label x="10" y="41" text="Template Name: " id="label3"/>

       

      <mx:TextInput x="110" y="39" width="168" id="textinput2"/>

       

      <mx:Label x="10" y="71" text="Description: " id="label4"/>

       

      <mx:TextInput x="110" y="69" width="168" id="textinput1"/>

       

      <mx:ComboBox x="420" y="8" width="104" id="combobox0" visible="false"></mx:ComboBox>

       

      <mx:Label x="320" y="10" text="Template Type: " id="label0" visible="false"/>

       

      <mx:CheckBox x="630" y="8" label="Checkbox" width="19" id="checkbox1" visible="false"/>

       

      <mx:Label x="558" y="10" text="Is Default" width="67" id="label5" visible="false"/>

       

       

      <mx:HBox x="10" y="90" width="726" height="217" horizontalScrollPolicy="on" id="hbox1" visible="false">

       

       

      <mx:VBox x="10" y="107" height="186" verticalScrollPolicy="auto" horizontalScrollPolicy="off">

       

       

      <mx:HBox x="10" y="108" width="726" height="27">

       

      <mx:Label x="11" y="86" text="Seq"/>

       

      <mx:Label x="61" y="86" text="Event ID" width="52"/>

       

      <mx:Label x="161" y="86" text="PSS Title"/>

       

      <mx:Label x="279" y="86" text="Custom Title"/>

       

      <mx:Label x="404" y="86" text="Event ID"/>

       

      <mx:Label x="503" y="86" text="Delta"/>

       

      </mx:HBox>

       

       

       

       

       

      <mx:HBox x="37" y="108" width="726" height="27">

       

      <mx:TextInput width="41"/>

       

      <mx:ComboBox width="92"></mx:ComboBox>

       

      <mx:TextInput width="110"/>

       

      <mx:TextInput width="117"/>

       

      <mx:ComboBox width="95"></mx:ComboBox>

       

      <mx:TextInput width="38"/>

       

      <mx:Spacer width="10"/>

       

      <mx:CheckBox label="Checkbox" width="20"/>

       

      <mx:ComboBox width="91"></mx:ComboBox>

       

      <mx:Spacer width="10"/>

       

      <mx:CheckBox label="Checkbox" width="21"/>

       

      </mx:HBox>

       

      <mx:AdvancedDataGrid id="adg1" designViewDataType="flat" width="723" height="152">

       

      <mx:columns>

       

      <mx:AdvancedDataGridColumn headerText="Column 1" dataField="col1"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 2" dataField="col2"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 3" dataField="col3"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 1" dataField="col1"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 2" dataField="col2"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 3" dataField="col3"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 1" dataField="col1"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 2" dataField="col2"/>

       

      <mx:AdvancedDataGridColumn headerText="Column 3" dataField="col3"/>

       

      </mx:columns>

       

      </mx:AdvancedDataGrid>

       

       

       

      </mx:VBox>

       

      <mx:TextArea x="543" y="64" width="60" text="Red if delinquent" wordWrap="true" height="39" fontSize="9"/>

       

      <mx:TextArea x="695" y="64" width="43" text="Deliverable" wordWrap="true" height="39" fontSize="9"/>

       

      <mx:Label x="404" y="65" text="----Calculated Events----" width="143" height="24"/>

       

      <mx:TextArea x="602" y="64" width="94" text="Yellow if Commit doesn't support" height="39" fontSize="9"/>

       

       

       

      <mx:Button x="744" y="170" label="^" width="30"/>

       

      <mx:Button x="744" y="223" label="V" width="30"/>

       

      <mx:Button x="739" y="109" label="Add" width="45" fontSize="7"/>

       

       

      </mx:HBox>

       

      <mx:Label id="dlbl" x="119" y="104" text="Deliverables" width="109" visible="true"/>

       

      <mx:List id="dlist" x="117" y="127" width="161" height="170" visible="true"></mx:List>

       

      <mx:Button x="7" y="319" label="Active Projects" width="113" id="button3"/>

       

      <mx:Button id="btnQ" x="217" y="7" label="Advanced" width="85" click="{currentState='templateAdv'}"/>

       

      <mx:ComboBox x="10" y="128" width="99"></mx:ComboBox>

       

      <mx:Label x="10" y="104" text="PSS EVENT"/>

       

      <mx:Button x="44" y="196" label="AddSpacer" width="65"/>

       

      </mx:Panel>

       

      </mx:AddChild>

       

      </mx:State>

       

      <mx:State name="templateAdv">

       

      <mx:SetProperty target="{ateAdv}" name="visible" value="true"/>

       

      <mx:SetProperty target="{combobox1}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label1}" name="visible" value="false"/>

       

      <mx:SetProperty target="{apDG}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button34}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label2}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button35}" name="visible" value="false"/>

       

      <mx:SetProperty target="{combobox2}" name="visible" value="false"/>

       

       

       

      </mx:State>

       

      <mx:State name="templateAdvAdd">

       

      <mx:SetProperty target="{ateAdv}" name="visible" value="true"/>

       

      <mx:SetProperty target="{apDG}" name="visible" value="false"/>

       

      <mx:SetProperty target="{combobox2}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button35}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label2}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button34}" name="visible" value="false"/>

       

      <mx:SetProperty target="{combobox1}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label1}" name="visible" value="false"/>

       

      <mx:SetProperty target="{button37}" name="visible" value="false"/>

       

      <mx:SetProperty target="{combobox3}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label8}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label7}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label6}" name="visible" value="false"/>

       

      <mx:SetProperty target="{textinput0}" name="visible" value="false"/>

       

      <mx:SetProperty target="{textinput3}" name="visible" value="false"/>

       

      <mx:SetProperty target="{label9}" name="visible" value="false"/>

       

      <mx:SetProperty target="{checkbox0}" name="visible" value="false"/>

       

      <mx:SetProperty target="{btnQ0}" name="visible" value="false"/>

       

      <mx:AddChild relativeTo="{ateAdv}" position="lastChild">

       

      <mx:ComboBox x="73" y="10" width="129"></mx:ComboBox>

       

      </mx:AddChild>

       

      <mx:AddChild relativeTo="{ateAdv}" position="lastChild">

       

      <mx:TextInput x="245" y="10"/>

       

      </mx:AddChild>

       

       

      </mx:State>

       

      </mx:states>

       

       

       

       

       

       

       

       

       

       

      <mx:Label id="lt" x="180.5" y="10" text="Settings for Group Manager" width="265" height="25" fontSize="18"/>

       

       

       

       

       

       

       

       

       

      <mx:Panel id="apDG" width="290" height="361" layout="absolute" title="Group/Role"

      paddingLeft="

      10" paddingRight="10" paddingTop="10" paddingBottom="10"

      x="

      47" y="75" verticalScrollPolicy="off" horizontalScrollPolicy="off" visible="true">

       

      <mx:Button x="19" y="124" width="80" label="Add/Edit" click="{currentState='addGroup'}" id="button33"/>

       

      <mx:Button x="169" y="124" width="80" label="Delete"/>

       

      <mx:Button x="20" y="286" width="80" label="Add/Edit" click="{currentState='addRole'}" id="button0"/>

       

      <mx:Button x="170" y="286" width="80" label="Delete"/>

       

      <mx:DataGrid x="16" y="10" width="233" height="106" dataProvider="" id="datagrid2">

       

      <mx:columns>

       

      <mx:DataGridColumn headerText="Groups" width="80" dataField="groupName"/>

       

      <mx:DataGridColumn headerText="Description" dataField="groupDescription"/>

       

      </mx:columns>

       

      </mx:DataGrid>

       

      <mx:DataGrid x="16" y="172" width="233" height="106" dataProvider="" id="datagrid0">

       

      <mx:columns>

       

      <mx:DataGridColumn headerText="Roles" width="80" dataField="groupName"/>

       

      <mx:DataGridColumn headerText="Description" dataField="groupDescription"/>

       

      </mx:columns>

       

      </mx:DataGrid>

       

      </mx:Panel>

       

       

       

       

      <mx:ComboBox x="167" y="45" id="combobox1"></mx:ComboBox>

       

      <mx:Label x="47" y="49" text="Select department:" id="label1"/>

       

      <mx:Button x="362" y="75" label="Create Template Quick" width="196" id="button34" click="{currentState='templateQuick'}"/>

       

      <mx:Button x="362" y="141" label="Create Template Advanced" width="196" id="button35" click="{currentState='templateAdv'}"/>

       

      <mx:Label x="362" y="100" text="(Requires a Group/Role selection.)" width="206" id="label2"/>

       

      <mx:ComboBox x="362" y="205" width="196" text="Clone Existing Template" id="combobox2"></mx:ComboBox>

       

        

        

       

      <mx:Panel x="48.5" y="54" width="539" height="394" layout="absolute" id="ateAdv" visible="false">

       

      <mx:DataGrid x="10" y="168" width="501" id="datagrid3">

       

      <mx:columns>

       

      <mx:DataGridColumn headerText="Column 1" dataField="col1"/>

       

      <mx:DataGridColumn headerText="Column 2" dataField="col2"/>

       

      <mx:DataGridColumn headerText="Column 3" dataField="col3"/>

       

      </mx:columns>

       

      </mx:DataGrid>

       

      <mx:Button x="455" y="322" label="Done" id="button36"/>

       

       

      <mx:Label x="22" y="23" text="Template Name: " id="label6"/>

       

      <mx:TextInput x="122" y="21" width="168" id="textinput0"/>

       

      <mx:Label x="22" y="53" text="Description: " id="label7"/>

       

      <mx:TextInput x="122" y="51" width="168" id="textinput3"/>

       

      <mx:ComboBox x="122" y="92" width="104" id="combobox3" visible="true"></mx:ComboBox>

       

      <mx:Label x="22" y="94" text="Template Type: " id="label8" visible="true"/>

       

      <mx:CheckBox x="320" y="92" label="Checkbox" width="19" id="checkbox0" visible="true"/>

       

      <mx:Label x="259" y="94" text=" Default?" width="67" id="label9" visible="true"/>

       

      <mx:Button id="btnQ0" x="426" y="21" label="Quick" width="85" click="{currentState='templateQuick'}"/>

       

      <mx:Button x="10" y="138" label="Add\Edit Events" click="{currentState='templateAdvAdd'}" id="button37"/>

       

       

      </mx:Panel>

       

       

       

       

       

      </mx:Application>