Источник:
http://alexvoy.blogspot.com/2019/06/...form-data.html
==============
<div dir="ltr" style="text-align: left;" trbidi="on"><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;">
///
/// Helper for form data source functionality
///
class FormDataSourceHelper
{
///
/// Allow edit for given fields only; the rest is non-editable
///
/// Caller form data source
/// Container with fields numbers for allowing
public static client
void allowEditFields(FormDataSource _fds, container _fields)
{
DictTable dictTable;
int fieldCnt, fieldNumber;
Set fieldsSet;
if(!_fds)
{
throw Error(Error::wrongUseOfFunction(funcName()));
}
dictTable =
new DictTable(_fds.table());
if(!dictTable)
{
throw Error(Error::wrongUseOfFunction(funcName()));
}
// everything is fine if we are here already
// first convert a given container of fields numbers to a set of unique values
fieldsSet =
new Set(Types::Integer);
for(fieldCnt =
1 ; fieldCnt