Статьи Королевства Дельфи

         

Выбор ссылки на объект FpTFbCommonType


wpTTableInfo := wpTFbCommonType.FbLUp.spTableInfo;

if wpTTableInfo = nil then

Continue;

if wpTTableInfo.sTableAttr.Values['sTableName'] <>

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sMTableName'] then

Continue;

wspTFieldInfo := wpTFbCommonType.FbLUp.spFieldInfo;

if wspTFieldInfo.sFieldAttr.Values['sFieldName'] <>

FDbInterface.N_pTFieldInfo.sFieldAttr.Values['sMFieldName'] then

Continue;

TypesComboBox.ItemIndex := i;

TypesComboBox.Text := TypesComboBox.Items[i];

Break;

end;

end;

NoGroup :

begin

end;

end;

end;

Procedure TFldDlgFr.OkBtnClick(Sender: TObject);

Var

k : Integer;

wErrorStr : String;

begin

if not AllCharsLatinic(FldNameEdit.Text) then

begin

Application.MessageBox('Допускаются только латинские буквы',

' Ошибка в идентификаторе поля', MB_OK);

FldNameEdit.SetFocus;

Exit;

end;

k := TypeGroupCmBox.ItemIndex;

if k < 0 then

begin

FbKernelWarning('Не выбрана группа данных');

Exit;

end;

FTFbTypeGroup := TFbTypeGroup(TypeGroupCmBox.Items.Objects[k]);

// Выбор ссылки на объект FpTFbCommonType

FpTFbCommonType := Get_SelectedFbFldTypeN(FDbInterface, TypesComboBox.ItemIndex,

TypesComboBox.Items, FTFbTypeGroup, True);

{ Общий контроль }

wErrorStr := '';

if TrimF(FldNameEdit.Text) = '' then

begin

if wErrorStr = '' then

wErrorStr := 'Не задан идентификатор поля'

else

wErrorStr := wErrorStr + #13'Не задан идентификатор поля';

FldNameEdit.SetFocus;

end;

if TrimF(FldCaptionEdit.Text) = '' then

begin

if wErrorStr = '' then

wErrorStr := 'Не задано наименование поля'

else

wErrorStr := wErrorStr + #13'Не задано наименование поля';

FldCaptionEdit.SetFocus;

end;

if TrimF(FldDescrEdit.Text) = '' then

begin

if wErrorStr = '' then

wErrorStr := 'Не задано описание поля'

else

wErrorStr := wErrorStr + #13'Не задано описание поля';

FldDescrEdit.SetFocus;

end;

if FpTFbCommonType = nil then

begin

if wErrorStr = '' then

wErrorStr := 'Не задан тип данных'

else

wErrorStr := wErrorStr + #13'Не задан тип данных';


Содержание  Назад  Вперед