diff --git a/include/mask.cpp b/include/mask.cpp index d3a2f7aee..1a9709ce4 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -464,11 +464,21 @@ void TMask::start_run() bool TMask::check_fields() { + WINDOW curpage = NULL_WIN; // Page under test + const int max = fields(); for (int i = 0; i < max; i++) { TMask_field& f = fld(i); - if (f.active() && !f.on_key(K_ENTER)) + if (!f.active()) continue; // Don't test inactive fields + if (f.parent() != curpage) + { + const int pa = find_parent_page(f); + if (!page_enabled(pa)) + break; // Page disabled: end of test + curpage = f.parent(); // Update current page + } + if (f.on_key(K_ENTER) == FALSE) { if (is_open()) f.set_focus(); return FALSE; diff --git a/include/maskfld.cpp b/include/maskfld.cpp index be56c59b0..b6a2283da 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -1,4 +1,4 @@ -// $Id: maskfld.cpp,v 1.18 1994-09-16 10:48:32 guy Exp $ +// $Id: maskfld.cpp,v 1.19 1994-09-16 16:59:05 guy Exp $ #include #include @@ -867,7 +867,7 @@ void TList_sheet::parse_output(TScanner& scanner) // il numero di riga selezionata int TList_sheet::do_input() { - if (_inp_id.empty()) return -1; + if (_inp_id.empty()) return -2; // List empty! _inp_id.restart(); TToken_string rowsel(80); @@ -902,14 +902,14 @@ int TList_sheet::do_input() if (!item) return i; } - return -1; + return -1; // Value not found! } // Certified 50% void TList_sheet::do_output(CheckTime t) { - if (_row == -1 || t == FINAL_CHECK) + if (_row < 0 || t == FINAL_CHECK) return; _out_id.restart(); @@ -1870,7 +1870,7 @@ bool TEdit_field::on_key(KEY key) if (!ok) { if (_warning.not_empty()) error_box(_warning); - else error_box("Valore non consistente: %s", (const char*)get()); + else error_box("Valore del campo %d non valido: %s", dlg(), (const char*)get()); return FALSE; } @@ -1924,7 +1924,7 @@ bool TEdit_field::on_key(KEY key) if (!ok) { if (_warning.not_empty()) error_box(_warning); - else error_box("Campo non consistente: '%s'", (const char*)get()); + else error_box("Valore del campo %d non valido: '%s'", dlg(), (const char*)get()); return FALSE; } }