Corretta gestione tasti in un radiobutton

Corretti recordarray


git-svn-id: svn://10.65.10.50/trunk@1571 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-07-06 15:22:26 +00:00
parent 7f283345e6
commit 5b2a3e59af
2 changed files with 31 additions and 16 deletions

View File

@ -3046,7 +3046,7 @@ bool TList_field::on_key(KEY key)
{
if (key >= '0' && key <= 'z')
{
const int index = xvt_list_get_sel_index(win());
const int index = current();
CHECK(index >= 0, "List with no selection!");
int newindex = -1;
@ -3088,13 +3088,16 @@ bool TList_field::on_key(KEY key)
}
if (newindex >= 0)
{
xvt_list_suspend(win());
xvt_list_set_sel(win(), index, FALSE);
xvt_list_set_sel(win(), newindex, TRUE);
xvt_list_resume(win());
}
} // alphanumeric
current(newindex);
/*
{
xvt_list_suspend(win());
xvt_list_set_sel(win(), index, FALSE);
xvt_list_set_sel(win(), newindex, TRUE);
xvt_list_resume(win());
}
*/
}
#if XVTWS == VMWS
if (key == K_TAB && class_id() == CLASS_LIST_FIELD)

View File

@ -1,4 +1,4 @@
// $Id: relation.cpp,v 1.50 1995-07-03 07:49:22 angelo Exp $
// $Id: relation.cpp,v 1.51 1995-07-06 15:22:26 guy Exp $
// relation.cpp
// fv 12/8/93
// relation class for isam files
@ -1422,6 +1422,7 @@ bool TRecord_array::renum_key(const char* field, const TString& num)
bool TRecord_array::renum_key(const char* field, long num)
{
CHECKS(num > 0, "Null key value for field: ", field);
TString16 n; n << num;
return renum_key(field, n);
}
@ -1493,12 +1494,23 @@ int TRecord_array::write(bool re)
const TRectype* r = (TRectype*)objptr(i);
if (r != NULL)
{
err = re ? f.rewrite(*r) : f.write(*r);
if (err != NOERR)
err = re ? f.write(*r) : f.rewrite(*r);
if (err != NOERR)
break;
{
if (re)
{
err = f.rewrite(*r);
if (err == _iskeynotfound || err == _iseof || err == _isemptyfile)
err = f.write(*r);
if (err != NOERR)
break;
}
else
{
err = f.write(*r);
if (err == _isreinsert)
err = f.rewrite(*r);
if (err != NOERR)
break;
}
}
else
{
@ -1513,7 +1525,7 @@ int TRecord_array::write(bool re)
}
}
if (err == NOERR)
if (re && err == NOERR)
{
// Cancella eventuali residui successivi
f.curr() = key(); f.put(_num, i + _offset);