Цитата:
Сообщение от
mazzy
раньше отображением прогресса и информированием пользователя занимался сам процесс-обработчик. теперь информировать должен вызывающий класс, а процесс-обработчик должен молчать в тряпочку...
Как вы думаете, почему выбрали именно такую архитектуру: за информирование должен отвечать вызывающий класс, а не сам процесс? может, я чего не понимаю?
Наверное для того, чтобы не блокировать пользовательский интерфейс. Пытаются сделать из Аксапты Андроид.
To run our program code asynchronously in the background without blocking the user interface, we use the new runasync methods of FormRun and Global classes.
This code will run the static class method on the background and call the callback function passing an AsyncTaskResult object to the method. From that object we can check the return value of the async method call (must be a container) and get the infolog result of the async execution.
You can click other buttons in the form and do other things as well without waiting for the code execution to complete, and we receive information messages as soon as the execution is finished.