Eliminato il check finale sui campi apparteneti a pagine disabilitate
git-svn-id: svn://10.65.10.50/trunk@263 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3c0e1c9a43
commit
867ca4bd7d
include
@ -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;
|
||||
|
@ -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 <xvt.h>
|
||||
|
||||
#include <applicat.h>
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user