Answer the question
In order to leave comments, you need to log in
How to properly organize the interaction of ui and business logic?
There is ui. Button and progress bar. By clicking on the button, a large number of files should be copied and the copy progress should be displayed.
Pressing the button calls the on_button_clicked() method, the method calls the FileCopier.copy_files() object method.
The dumbest thing you can do is call the parent progress bar update method in the copy_files() method.
How to smartly update ui progress bar from business logic?
Answer the question
In order to leave comments, you need to log in
The copy_files() method should provide information on the progress of copying by calling a function (callback) or sending an event (event) (depending on the programming language)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question