flex 4 暂时暂停执行
我正在使用 Flex-4 构建一个依赖于数据库的应用程序。我希望应用程序暂停执行,直到收到数据库的回复(使用 PHP-SQL 请求)。 Flex 在执行过程中,即使您调用需要警报/弹出窗口的用户输入,也会显示警报并继续进一步执行,而不会因用户输入而暂停。
一种解决方法是在一个函数中发送数据请求,并在另一个函数中检查所请求数据的到达(可能使用结果事件作为触发器)。但我想要一个暂停-继续功能。
请帮忙。
谢谢和问候,
拉胡尔
I am building a database dependent application using Flex-4. I would like the application to pause execution till i receive a reply from my DB (using PHP-SQL request). Flex, in its execution, even if you call for a user input required Alert/Pop-Up, displays the Alert and continues further execution without pausing for a user input.
One work around was to send the data request in one function and check the arrival of the requested data in another (maybe use the result event as a trigger). But I would like to have a pause-continue functionality.
Please assist.
Thanks and Regards,
Rahul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定您所说的暂停应用程序到底是什么意思。从你的问题来看,你似乎想阻止用户的任何输入。这通常是通过禁用所有用户控件直到收到服务器的响应来完成的。您可以直接禁用放置所有这些控件的面板,而不是对每个控件执行此操作。
I am not sure exactly what you mean by pausing the application. From your question, it seems as though you want to prevent any input from the user. This is usually done by disabling all the user controls till you receive the response from the server. Instead of doing that for each control, you can directly disable the panel in which all these controls are placed.
向正在执行数据库代码的函数发送回调。
Send a callback to your function that is executing the DB code.