This content has been marked as final. Show 5 replies
I don't understand.
If you want to show a pop-up to users before the action starts, show the pop-up when the user initiates the action and do the real action when the user interacts with the pop-up.
If you want to prevent the user from interacting with the application while the job is going on. Disable the app in the "Start Action" method handler and re-enabled it in the "Result" method handler.
If you have asyc processing as part of your action; do the processing you can up until the async part; then continue on the saync result handler method.
you are at liberty to pass whatever you like in a custom event, but I don't think you need that kind of capability.
Surely the easiest way to do what you want is one of two choices:
1) Let the user get on with other stuff while waiting for their process to complete, or
2) Make it clear to them there's nothing they can sensibly be getting on with until it returns.
Either way you need some kind of GUI item showing the current state of their operation. I am assuming that the processing takes long enough you have genuine concerns about this?
Think of it like sending a post to this list - you can either get on with other stuff while you're waiting for someone to reply, or you can just sit looking at the screen!
I would probably recommend you have your server-side code managing some aspects of this, so that if they get bored or go home overnight the whole invoked process is not lost. That is outside the scope of your Flex app but is part of your whole system. In that case think of it like email - you can close your computer down and when you next switch on you can find out who has replied.
Hope that helps,
Thanks for the answers and sorry for my English. I'll try again to explain my problem.
I don't want any pop-ups. All I want - one single button - "Do job". But the problem is that the job itself has URLLoader.load() method at the end and some asynchronous call in the middle.
URLLoader.load() is restricted method, which may be called only when there is some user-initiated-action higher on stack. And the problem is that I cannot get this damn UIA on stack. Here is err... some sort of program flow diagram %) :
do-the-job-click() -> SomeSyncAction() -> SomeAsyncActionStart() .... <here we lost our UIA permission> ... SomeAsyncMethodCompleteEventHandler() -> UploadResults()
And - UploadResults() cannot call URLLoader.load(). Because it is not UIA for Flash. But async methods are all over AS3/Flex API! Each of them breaks calls chain and after each such call!
As far as I can tell, you're correct. My suggestion would be to allow
continued user interaction while processing, and give some visual
identifier that the data is being processed. Then, when the processing
has finished, display a pop-up with the option to send or cancel.
For more information about these security measures, as well as a list of
the operations they apply to and the reasons, see:
Thanks to all for the answers.
I hope that Adobe developers read this forum and they will do something with this stuff. Some sort of signed swfs, permission tickets which can be passed across events chain or bound to some objects or anything else.
UIA restrictions are real pain. Yes, roar of displeased voices now almost gone - after swfUploader update, which was installed on each blog. And users accepted to use Flash UI to initiate actions (maybe with some hacks such as transparent buttons %)).
But the problem which I faced is more fundamental, IMHO of course. It prevents a lot of scenarios which are natural for RIA. And it restricts "fair players". I mean developers which wanna create AS3/Flex apps with rich flash UI and significant client-side data processing.
Best regards, Alex