flex:从 popUp 引用调用对象
我遇到的情况是,屏幕上有一些图像,并分配了业务属性(值、数量、质量等级)。当我单击它们时,需要打开一个弹出窗口,并允许我更改图像下项目的属性。我该如何参考 a) 导致弹出窗口打开的对象 b) 数组中对象的属性 - 用于初始视图和更改
我已启用双击图像,如下所示
newImage.doubleClickEnabled=true;
newImage.addEventListener(MouseEvent.DOUBLE_CLICK,createModifyPopUp);
我当前正在调用弹出窗口,如下所示
private function createModifyPopUp(evt:MouseEvent):void{
var mywin1:Modify=PopUpManager.createPopUp(this,Modify,true) as Modify;
PopUpManager.centerPopUp(mywin1);
}
我似乎没有将事件传递到弹出窗口中- 有没有一种方法可以根据原始应用程序中单击的图像来构建和捕获修改中的信息。
I have a situation where I have some images on screen with business properties(value, quantity, qualitygrade) assigned to them. When I click on them, a popUp window needs to open and allow me to change properties for the item under the image. How do I reference
a) object that caused the popup to open
b) properties of the object that are housed in a array- both for initial view and change
I have the images enabled for doubleclick as follows
newImage.doubleClickEnabled=true;
newImage.addEventListener(MouseEvent.DOUBLE_CLICK,createModifyPopUp);
I am currently calling the popUp window as follows
private function createModifyPopUp(evt:MouseEvent):void{
var mywin1:Modify=PopUpManager.createPopUp(this,Modify,true) as Modify;
PopUpManager.centerPopUp(mywin1);
}
I don't seem to be passing an event into the popup- Is there a way I can work based on the image clicked in the original application to build and capture information in the modify.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需使用 PopUpManager.addPopup 而不是 PopUpManager.createPopUp
您的示例应如下所示:
simply use PopUpManager.addPopup instead of PopUpManager.createPopUp
your example should look like this: