* Added support for tablenamehint in generated code

git-svn-id: trunk@15931 -
This commit is contained in:
michael 2008-07-31 12:42:02 +00:00
parent 78a1d090fe
commit 8b4dbc4315
2 changed files with 7 additions and 0 deletions

View File

@ -116,6 +116,8 @@ procedure TDataPanel.CreateCode;
begin
With TFPCodeGenerator.Create(Dataset) do
try
If Self.TableName<>'' then
TableNameHint:=Self.TableName;
Execute;
Finally
Free;

View File

@ -234,6 +234,7 @@ begin
FTV.Parent:=Self;
FTV.Align:=alClient;
FTV.OnSelectionChanged:=@DoSelectNode;
FTV.ShowLines:=True;
FIMgList:=TImageList.Create(Self);
For I:=0 to 8 do
begin
@ -419,6 +420,7 @@ Var
begin
ClearEditor;
TV:=TTreeView.Create(Self);
TV.ShowLines:=True;
TV.Parent:=FEdit;
TV.Align:=alClient;
ShowTables(TV,Nil,False,false);
@ -446,6 +448,7 @@ Var
begin
ClearEditor;
TV:=TTreeView.Create(Self);
TV.ShowLines:=True;
TV.Parent:=FEdit;
TV.Align:=alClient;
ShowFields(TV,Nil,TableDef);
@ -460,6 +463,7 @@ Var
begin
ClearEditor;
TV:=TTreeView.Create(Self);
TV.ShowLines:=True;
TV.Parent:=FEdit;
TV.Align:=alClient;
ShowIndexes(TV,Nil,TableDef);
@ -764,6 +768,7 @@ begin
With TFPCodeGenerator.Create(DS) do
try
DataSet:=DS;
TableNameHint:=TD.TableName;
Execute;
Finally
Free;