Patch level : 10.0 336

Files correlati     : ve0
Ricompilazione Demo : [ ]
Commento            :
Migliorata validazione date (Bolle Lavanderie)


git-svn-id: svn://10.65.10.50/trunk@19012 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-06-11 14:52:46 +00:00
parent eb59d4d7c9
commit 1e2d64d930
3 changed files with 18 additions and 19 deletions

View File

@ -217,6 +217,13 @@ void TMask::read_mask(
}
}
}
else
{
// Faccio una prima passata in questa occasione: tuttavia il ciclo
// verra' ripetuto nella load checks, nel caso ci siano campi aggiunti dinamicamente
FOR_EACH_MASK_FIELD((*this), i, f) if (f->is_edit())
((TEdit_field*)f)->test_drivers();
}
}
void TMask::add_field(TMask_field* f)
@ -2103,14 +2110,14 @@ TReal_field& TMask::add_number (
//
// @rdesc Ritorna l'handle del campo creato
TCurrency_field& TMask::add_currency (
short id, // @parm Numero identificatore del campo da aggiungere
int page, // @parm Pagina nel quale aggiungere il campo
short id, // @parm Numero identificatore del campo da aggiungere
int page, // @parm Pagina nel quale aggiungere il campo
const char* prompt, // @parm Prompt del campo
int x, // @parm Coordinata x (in caratteri)
int y, // @parm Coordinata y (in caratteri)
int dim, // @parm Lunghezza del campo sulla maschera
int x, // @parm Coordinata x (in caratteri)
int y, // @parm Coordinata y (in caratteri)
int dim, // @parm Lunghezza del campo sulla maschera
const char* flags, // @parm Flag di controllo del campo (default "")
short driver) // @parm Campo con codice valuta
short driver) // @parm Campo con codice valuta
// @xref <mf TMask::add_static> <mf TMask::add_string> <mf TMask::add_date>
// <mf TMask::add_button> <mf TMask::add_radio> <mf TMask::add_memo>

View File

@ -534,7 +534,7 @@ const TString & TMask_field::evaluate_field(short id) const
TSheet_field* sh = m->get_sheet();
if (sh != NULL)
{
m = &sh->mask();
m = &sh->mask();
id = -id;
}
}
@ -3629,7 +3629,7 @@ bool TEdit_field::on_hit()
if (vf == AUTOEXIT_FUNC || vf == NUMCALC_FUNC || vf == STRCALC_FUNC || vf == 21)
{
const bool ok = validate(K_TAB); // Check validation expression
if (!ok) return FALSE;
if (!ok) return false;
}
}

View File

@ -27,22 +27,14 @@ HIDDEN int get_int_val_param(int i)
HIDDEN const TString& get_fld_val_param(const TMask_field& f, int i)
{
const short id = f.atodlg(get_val_param(i));
if (id == THIS_FIELD)
return f.get();
const TMask& m = f.mask();
const int pos = id > 0 ? m.id2pos(id) : -1;
if (pos >= 0)
return m.fld(pos).get();
return EMPTY_STRING;
const TString & id = get_val_param(i);
return f.evaluate_field(id);
}
HIDDEN bool _expr_val(TMask_field& f, KEY)
{
const TMask& m = f.mask();
const TTypeexp type = get_int_val_param(0) == 0 ? _numexpr :_strexpr;
const TTypeexp type = get_int_val_param(0) == 0 ? _numexpr : _strexpr;
TExpression e(get_val_param(1), type);
for (int i = 0; i < e.numvar(); i++)