📜 ⬆️ ⬇️

Extjs, dialogues and universal evil!

Yes! I mistakenly believe that dialogs like "and you definitely want to remove the selected objects" are a universal evil. But think so few.
It is constantly required to stick this disgrace in the code. But here, not everything is smooth.
In Extjs this is somehow done through the head.
I just want to write:
var answ = confirmDlg('Are you sure?');
if (answ=='ok'){
this.deleteSelectedItems();
}

where this is our tablet. Convenient and joyful. But no. The “windows” are asynchronous and outrageously objective too. It is necessary to process the answer "inside" the window object. And this already refers not to my table, but to the window. And the dance begins with id and with access to the table.

And how do you do in similar cases?

')

Source: https://habr.com/ru/post/23344/


All Articles