setup form !!modalForm BLOCKINGDIALOG !this.formTitle = 'Выберите значение' paragraph .paraQuestion AT X 0 YMIN ANCHOR LEFT+TOP TEXT '' WIDTH 50 LINE 5 button .btnFirst AT X 0 YMAX 'Первый' ANCHOR BOTTOM+RIGHT CALLBACK '!this.answer(!this.first)' WIDTH 7 button .btnSecond AT XMAX+1 YMIN 'Второй' ANCHOR BOTTOM+RIGHT CALLBACK '!this.answer(!this.second)' WIDTH 7 button .btnCancel AT XMAX FORM-SIZE YMIN 'Отмена' ANCHOR BOTTOM+RIGHT CALLBACK '!this.answer(||)' WIDTH 7 member .first is STRING member .second is STRING member .answer is STRING member .callbackMethod is STRING exit define method .setForm(!title is STRING, !question is STRING, !first is STRING, !second is STRING, !callbackMethod is STRING) !this.formTitle = !title !this.paraQuestion.val = !question !this.first = !first !this.btnFirst.tag = !first !this.second = !second !this.btnSecond.tag = !second !this.callbackMethod = !callbackMethod endmethod define method .answer(!text is STRING) !this.answer = !text !this.hide() !callback = '$!this.callbackMethod' & '(|' & '$!this.answer' & '|)' $!callback endmethod