加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Error #1065: 变量 未定义 global/flash.utils::getDefinitionBy

发布时间:2020-12-15 17:44:05 所属栏目:百科 来源:网络整理
导读:flex报的错误,完整的错误如下: ReferenceError: Error #1065: 变量 未定义。at global/flash.utils::getDefinitionByName()at mx.utils::DescribeTypeCache$/describeType()[C:autobuild3.2.0frameworksprojectsframeworksrcmxutilsDescribeTypeC

flex报的错误,完整的错误如下:

ReferenceError: Error #1065: 变量  未定义。
	at global/flash.utils::getDefinitionByName()
	at mx.utils::DescribeTypeCache$/describeType()[C:autobuild3.2.0frameworksprojectsframeworksrcmxutilsDescribeTypeCache.as:95]
	at mx.utils::ObjectUtil$/getClassInfo()[C:autobuild3.2.0frameworksprojectsframeworksrcmxutilsObjectUtil.as:829]
	at mx.controls::DataGrid/generateCols()[E:dev3.0.xframeworksprojectsframeworksrcmxcontrolsDataGrid.as:2407]
	at mx.controls::DataGrid/collectionChangeHandler()[E:dev3.0.xframeworksprojectsframeworksrcmxcontrolsDataGrid.as:4132]
	at mx.controls.listClasses::ListBase/set dataProvider()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcontrolslistClassesListBase.as:1827]
	at mx.controls::DataGrid/set dataProvider()[E:dev3.0.xframeworksprojectsframeworksrcmxcontrolsDataGrid.as:1334]
	at mx.core::Container/createComponentFromDescriptor()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3595]
	at mx.core::Container/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3493]
	at mx.containers::Panel/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcontainersPanel.as:1528]
	at mx.core::Container/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2589]
	at mx.containers::Panel/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcontainersPanel.as:1056]
	at mx.core::UIComponent/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5370]
	at mx.core::Container/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2526]
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5267]
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3305]
	at mx.core::Container/addChildAt()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2217]
	at mx.core::Container/addChild()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2140]
	at mx.core::Container/createComponentFromDescriptor()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3681]
	at mx.core::Container/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3493]
	at mx.core::Container/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2589]
	at mx.core::UIComponent/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5370]
	at mx.core::Container/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2526]
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5267]
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3305]
	at mx.core::Container/addChildAt()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2217]
	at mx.core::Container/addChild()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2140]
	at mx.core::Container/createComponentFromDescriptor()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3681]
	at mx.core::Container/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3493]
	at mx.core::Container/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2589]
	at mx.core::UIComponent/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5370]
	at mx.core::Container/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2526]
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5267]
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3305]
	at mx.core::Container/addChildAt()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2217]
	at mx.core::Container/addChild()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2140]
	at mx.core::Container/createComponentFromDescriptor()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3681]
	at mx.core::Container/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3493]
	at mx.containers::Panel/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcontainersPanel.as:1528]
	at mx.core::Container/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2589]
	at mx.containers::Panel/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcontainersPanel.as:1056]
	at mx.core::UIComponent/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5370]
	at mx.core::Container/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2526]
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5267]
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3305]
	at mx.core::Container/addChildAt()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2217]
	at mx.core::Container/addChild()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2140]
	at mx.core::Container/createComponentFromDescriptor()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3681]
	at mx.core::Container/createComponentsFromDescriptors()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:3493]
	at mx.core::Container/createChildren()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2589]
	at mx.core::UIComponent/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5370]
	at mx.core::Container/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreContainer.as:2526]
	at mx.core::Application/initialize()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreApplication.as:846]
	at CloudRandomForest/initialize()[E:fansy_workprojectcaic-riasrcCloudRandomForest.mxml:0]
	at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:autobuild3.2.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:2009]
	at mx.managers::SystemManager/initializeTopLevelWindow()[C:autobuild3.2.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:3234]
	at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C:autobuild3.2.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:3064]
	at mx.managers::SystemManager/docFrameListener()[C:autobuild3.2.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:2916]
TypeError: Error #1009: 无法访问空对象引用的属性或方法。
	at mx.containers::Panel/commitProperties()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcontainersPanel.as:1159]
	at mx.core::UIComponent/validateProperties()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:5807]
	at mx.managers::LayoutManager/validateProperties()[C:autobuild3.2.0frameworksprojectsframeworksrcmxmanagersLayoutManager.as:539]
	at mx.managers::LayoutManager/doPhasedInstantiation()[C:autobuild3.2.0frameworksprojectsframeworksrcmxmanagersLayoutManager.as:659]
	at Function/http://adobe.com/AS3/2006/builtin::apply()
	at mx.core::UIComponent/callLaterDispatcher2()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:8628]
	at mx.core::UIComponent/callLaterDispatcher()[C:autobuild3.2.0frameworksprojectsframeworksrcmxcoreUIComponent.as:8568]

这个错误在09年就有人提出来了,链接为:http://www.iteye.com/problems/27570,和我的错误一样。

下面是一个相对合理的解释。

针对一个MXML文件:

方式一: private var myId:String ; ? ? 或者 [Bindable] private var myId:String ;??

方式二: private var myId:String =""; 或者 [Bindable]?private var myId:String ="";

方式三: private var myId:String = null; 或者 [Bindable]??private var myId:String = null;

这三种方式都不行;

可以使用的是 在前面加上// 也就是把它们去掉,这里需要郑重说明的一点是 myId变量在整个页面的其他地方没有用到,所以才出现了这个问题。纠结呀,搞了好久,才发现这个问题。如果在下面的界面中用到了myId这个变量,那么就不会出现这个问题了。看来编程也不是随便的复制别人的代码,还要每个变量都推敲一下呀。


分享,成长,快乐

转载请注明blog地址:http://blog.csdn.net/fansy1990

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读