Rif. mod. 95/49.
Aggiunti i MESSAGE EMPTY ai forms. Modificate: TForm_item::parse_item(), TForm_item::do_message(), TForm_string::update() e TForm_number::update(). git-svn-id: svn://10.65.10.50/trunk@2074 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
cf9202b26f
commit
552d51f08a
@ -320,9 +320,15 @@ bool TForm_item::parse_item(TScanner& scanner)
|
||||
if (scanner.key() == "ME")
|
||||
{
|
||||
TFixed_string m(scanner.line());
|
||||
m.strip_spaces();
|
||||
m.strip_spaces();
|
||||
int n = 0;
|
||||
if (m.left(5) == "EMPTY")
|
||||
{
|
||||
n = 1;
|
||||
m.ltrim(5);
|
||||
}
|
||||
if (!m.blank())
|
||||
message(0).add(m);
|
||||
message(n).add(m);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -563,7 +569,6 @@ bool TForm_item::update()
|
||||
}
|
||||
else string_at(_x, _y, _prompt);
|
||||
|
||||
do_message();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1022,6 +1027,7 @@ bool TForm_string::update()
|
||||
{
|
||||
if (read())
|
||||
{
|
||||
TString s;
|
||||
TForm_item::update();
|
||||
if (!picture().blank())
|
||||
{
|
||||
@ -1038,7 +1044,6 @@ bool TForm_string::update()
|
||||
}
|
||||
}
|
||||
|
||||
TString80 s;
|
||||
if (class_name() == "DATA" && _str.empty())
|
||||
s ="";
|
||||
else
|
||||
@ -1065,10 +1070,12 @@ bool TForm_string::update()
|
||||
if (d.not_empty()) // Se il secondo delimitatore e' valido ...
|
||||
s << d; // ... aggiungilo alla fine
|
||||
}
|
||||
put_paragraph(s);
|
||||
put_paragraph(s);
|
||||
}
|
||||
else
|
||||
put_paragraph(get()); // Stampa immediata senza picture
|
||||
put_paragraph(s=get()); // Stampa immediata senza picture
|
||||
const int n = (_message.objptr(1) != NULL && s.empty() ? 1 : 0);
|
||||
do_message(n);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1112,6 +1119,7 @@ bool TForm_number::update()
|
||||
|
||||
real n(get());
|
||||
n.round(decimals());
|
||||
TString s;
|
||||
|
||||
if (!n.is_zero())
|
||||
{
|
||||
@ -1136,7 +1144,7 @@ bool TForm_number::update()
|
||||
}
|
||||
}
|
||||
|
||||
TString80 s(n.string(pic)); // riempi la stringa col valore pitturato
|
||||
s=n.string(pic); // riempi la stringa col valore pitturato
|
||||
|
||||
if (maxlen >= 0)
|
||||
s.cut(maxlen);
|
||||
@ -1165,7 +1173,13 @@ bool TForm_number::update()
|
||||
}
|
||||
else
|
||||
put_paragraph(n.string());
|
||||
}
|
||||
do_message();
|
||||
}
|
||||
else
|
||||
{
|
||||
const int n = (_message.objptr(1) != NULL ? 1 : 0);
|
||||
do_message(n);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user