Application::executeSelectorFunction() with different priority levels.
and scripts with equal priority level are executed in the order you send them.
QCubed task order:
- Render/update html
- Execute QActions attached to controls with Events
Take a look at the example below. By clicking on one of the buttons the
datagrid gets updated and an alert box will show up.
Try clicking on buttons of both rows and look at the different update-behaviour.
The interesting code resides in the methods renderButton_Click and renderLowPriorityButton_Click
In these methods the datagrid is marked as modified (render it again, including all the buttons),
The parameter Application::PRIORITY_LOW forces the script to be executed after all scripts with higher priority.
If you hit a update & low priority alert button the alert boxes have low priority,
and the color is changed immediately.
When hitting a update & alert button the color will be changed after the alert boxes show up because
all scripts are executed with standard priority.