swiz 元标签[EventHandler]

[EventHandler( event="UserEvent.ADD_USER", properties="user" )]

public function addUser( user:User ):void

if  the properties    more than  one 

the tag  event  [EventHandler]  how   to write,such as " public function addUser( user:User,sex:String ):void"

 

大意是:如何在

[EventHandler( event="UserEvent.ADD_USER", properties="user" )] 添加多个属性,也就是在事件传递过程中如何配置传递多个属性到控制器来

 

解决方法:

Not sure if you didn't read the above section on the properties attribute, or if you somehow missed it, but it clearly says to use a comma-delimited list of property names. So you want: [EventHandler( event="UserEvent.ADD_USER", properties="user,sex" )]

 

使用[EventHandler( event="UserEvent.ADD_USER", properties="user,sex" )],可以解决多参数问题,试过了,成功。。。

 

你可能感兴趣的:(swiz 元标签[EventHandler])