View unanswered posts | View active topics It is currently 2019-09-16 14:36



This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
 flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。 
Author Message
新手上路

Joined: 2016-09-12 15:50
Posts: 3
Post flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。
TypeError: Error #2007: 参数 type 不能为空。
at flash.events::EventDispatcher/addEventListener()
at mx.core::Container/addEventListener()
at Function/<anonymous>()[D:\flas代码\nms\src\com\ztesoft\nms\web\topology\resource\script\systemTopology.as:166]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at twaver.network.interaction::BasicInteractionHandler/dispatchEvent()[/Users/paul/Documents/workspace/Code/Flex/TWaver/src/twaver/network/interaction/BasicInteractionHandler.as:32]
at twaver.network.interaction::DefaultInteractionHandler/handleMouseDown()[/Users/paul/Documents/workspace/Code/Flex/TWaver/src/twaver/network/interaction/DefaultInteractionHandler.as:90]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.managers::SystemManager/mouseEventHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2924]

具体报错如上;
我把flex 的sdk4.5.1 version=15 Player11.5;还是有这个问题,请大神讲解下,哪里可能存在问题?


2016-09-12 15:55
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。
能否提供下示例demo


2016-09-12 18:00
Profile
新手上路

Joined: 2016-09-12 15:50
Posts: 3
Post Re: flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。
Jeff.Fu wrote:
能否提供下示例demo


案列如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:twaver="http://www.servasoftware.com/2009/twaver/flex"
minWidth="100" minHeight="100" layout="absolute" initialize="initializeHandler(event)" creationComplete="init();">
<!--<mx:Style source="/resource/style/default.css" />-->
<mx:Script source="com/ztesoft/systemTopology.as" />
<!--<mx:XML source="com/ztesoft/nms/license/license.xml" id="license"/>-->
<mx:VBox width="100%" height="100%" horizontalGap="0" backgroundColor="0xE2E8F2">
<mx:Canvas width="100%" height="100%" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<twaver:Network id="network" width="100%" height="100%"/>
</mx:Canvas>
</mx:VBox>
</mx:Application>

import flash.events.MouseEvent;

import mx.controls.Alert;
import mx.events.FlexEvent;

public function initializeHandler(event:FlexEvent):void{
network.addEventListener(MouseEvent.RIGHT_CLICK, handleRightClick);
}


function handleRightClick():void{
Alert.show("111");

}
文件是项目文件,把后缀改下fxp。


2016-09-13 10:15
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。
参考链接:
[url]
http://servasoft.com/twaver-flex/%E4%BD ... 8D%95.html
[/url]


2016-09-13 10:30
Profile
新手上路

Joined: 2016-09-12 15:50
Posts: 3
Post Re: flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。
ok,谢谢了


2016-09-13 16:25
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: flex 右键监听 TypeError: Error #2007: 参数 type 不能为空。
:love:


2016-10-24 17:23
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: