我正在尝试使用选择器(当命令对象接收事件时过滤事件,但永远不会被调用!!在这里帮助我的代码片段:在我的上下文文件中:
<MapCommand type="com.pz.events.FolderEvent" selector="folderDelete">
<Command type="com.pz.command.DeleteFolderCommand"/>
</MapCommand>
分发事件代码片段:
dispatchEvent(new FolderEvent(FolderEvent.FOLDER_DELETED,targetRoot.selectedItem));
元标记:
[Event(name="folderDelete",type="com.pz.events.FolderEvent")]
[ManagedEvents("folderCreate,folderDelete,folderOpen,folderClose,folderRelocate")]