fatto anche check nella do_output

git-svn-id: svn://10.65.10.50/trunk@3676 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1996-09-26 15:31:43 +00:00
parent ec4bf8d8e8
commit 0c3ca2f48b

View File

@ -1616,7 +1616,10 @@ void TList_sheet::do_output(CheckTime t)
const bool hit = f.get() != val; const bool hit = f.get() != val;
f.set(val); f.set(val);
if (field().dlg() != id && hit) if (field().dlg() != id && hit)
{
f.on_hit(); f.on_hit();
f.check();
}
} }
} }
} }
@ -1736,6 +1739,7 @@ void TBrowse::parse_output(TScanner& scanner)
_out_id.add(s); _out_id.add(s);
s = scanner.pop(); s = scanner.pop();
_out_fn.add(s); _out_fn.add(s);
_secondary = FALSE;
} }
@ -1795,7 +1799,7 @@ void TBrowse::parse_join(TScanner& scanner)
key = scanner.integer(); key = scanner.integer();
else scanner.push(); else scanner.push();
byte alias = 0; int alias = 0;
if (scanner.popkey() == "AL") if (scanner.popkey() == "AL")
alias = scanner.integer(); alias = scanner.integer();
else scanner.push(); else scanner.push();
@ -1936,6 +1940,8 @@ int TBrowse::do_input(
if (!filter) return ne; if (!filter) return ne;
TString work(_filter.size()); TString work(_filter.size());
bool filter_update = FALSE;
for (int i = 0; _filter[i]; i++) for (int i = 0; _filter[i]; i++)
{ {
if (_filter[i] == '"') if (_filter[i] == '"')
@ -1955,10 +1961,15 @@ int TBrowse::do_input(
while (isdigit(_filter[i])) i++; while (isdigit(_filter[i])) i++;
i--; i--;
} }
else work << _filter[i]; else
{
work << _filter[i];
if (_filter[i] == '-' && _filter[i + 1] == '>')
filter_update = TRUE;
}
} }
_cursor->setfilter(work); _cursor->setfilter(work, filter_update);
_cursor->setregion(filtrec, filtrec); _cursor->setregion(filtrec, filtrec);
return ne; return ne;
@ -2000,18 +2011,31 @@ void TBrowse::do_output(CheckTime t)
const bool hit = f.get() != sum; const bool hit = f.get() != sum;
f.set(sum); f.set(sum);
if (field().dlg() != id && hit) if (field().dlg() != id && hit)
{
f.on_hit(); f.on_hit();
f.check();
}
} }
} }
} }
void TBrowse::do_clear() void TBrowse::do_clear()
{ {
for (TString16 fld = _out_id.get(0); fld.not_empty(); fld = _out_id.get()) for (TString16 fld = _out_id.get(0); fld.not_empty(); fld = _out_id.get())
{ {
const short id = field().atodlg(fld);
TMask_field& f = field(atoi(fld)); TMask_field& f = field(atoi(fld));
if (f.field() == NULL && _inp_id.get_pos(fld) < 0) if (f.field() == NULL && _inp_id.get_pos(fld) < 0)
{
const bool hit = f.get().not_empty();
f.reset(); f.reset();
if (field().dlg() != id && hit)
{
f.on_hit();
f.check();
}
}
} }
} }
@ -2444,7 +2468,7 @@ bool TEdit_field::parse_item(TScanner& scanner)
#endif #endif
int key = 1; int key = 1;
TRelation* r; TRelation* r = NULL;
const int logicnum = scanner.integer(); const int logicnum = scanner.integer();
TString16 tabmaskname; TString16 tabmaskname;
@ -2795,8 +2819,14 @@ bool TEdit_field::on_key(KEY key)
} }
if (ok) if (ok)
ok = on_hit(); ok = on_hit();
else
{
if (empty())
ok = TRUE;
else else
default_error_box(); default_error_box();
}
if (ok) if (ok)
{ {
@ -3179,11 +3209,11 @@ bool TReal_field::parse_item(TScanner& scanner)
_decimals = _picture.len() - comma - 1; _decimals = _picture.len() - comma - 1;
} }
} }
#ifdef DBG //#ifdef DBG
if (_ctl_data._size > 9 && _ctl_data._size != 15) // if (_ctl_data._size > 9 && _ctl_data._size != 15)
::warning_box("Guy propone una dimensione di 15 per il campo %d: %s\nMa probabilmente ha toppato ...", // ::warning_box("Guy propone una dimensione di %d per il campo %d: %s\nMa probabilmente ha toppato ...",
_ctl_data._dlg, (const char*)_ctl_data._prompt); // preferred_size, _ctl_data._dlg, (const char*)_ctl_data._prompt);
#endif //#endif
return TRUE; return TRUE;
} }