ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/design/IBDBReg.pas
(Generate patch)

Comparing ibx/trunk/design/IBDBReg.pas (file contents):
Revision 106 by tony, Thu Jan 18 14:37:35 2018 UTC vs.
Revision 107 by tony, Thu Jan 18 14:37:40 2018 UTC

# Line 83 | Line 83 | type
83      procedure GetValues(Proc: TGetStrProc); override;
84    end;
85  
86 +  { TIBPackageNameProperty
87 +    Editor for the TIBStoredProc.PackageName property.  Displays a drop-down list of all
88 +    the StoredProcedures in the Database.}
89 +  TIBPackageNameProperty = class(TIBNameProperty)
90 +  public
91 +    procedure GetValues(Proc: TGetStrProc); override;
92 +  end;
93 +
94    { TIBTableNameProperty
95      Editor for the TIBTable.TableName property.  Displays a drop-down list of all
96      the Tables in the Database.}
# Line 196 | Line 204 | type
204    end;
205  
206    TIBStoredProcParamsProperty = class(TCollectionPropertyEditor)
199  public
200    procedure Edit; override;
207    end;
208  
209    { TIBTableFieldLinkProperty }
# Line 436 | Line 442 | begin
442    RegisterComponents(IBPalette3,[TIBLookupComboEditBox,TIBDynamicGrid,TIBTreeView,TDBControlGrid, TIBArrayGrid]);
443    RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'DatabaseName', TIBFileNameProperty); {do not localize}
444    RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'StoredProcName', TIBStoredProcNameProperty); {do not localize}
445 +  RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'PackageName', TIBPackageNameProperty); {do not localize}
446    RegisterPropertyEditor(TypeInfo(TParams), TIBStoredProc, 'Params', TIBStoredProcParamsProperty);
447    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'TableName', TIBTableNameProperty); {do not localize}
448    RegisterPropertyEditor(TypeInfo(string), TIBTable, 'IndexName', TIBIndexNameProperty); {do not localize}
# Line 457 | Line 464 | begin
464    RegisterPropertyEditor(TypeInfo(TStrings), TIBEvents, 'Events', TIBEventListProperty); {do not localize}
465    RegisterPropertyEditor(TypeInfo(TPersistent), TIBDataSet, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
466    RegisterPropertyEditor(TypeInfo(TPersistent), TIBQuery, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
467 +  RegisterPropertyEditor(TypeInfo(TPersistent), TIBTable, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
468  
469    RegisterComponentEditor(TIBDatabase, TIBDatabaseEditor);
470    RegisterComponentEditor(TIBTransaction, TIBTransactionEditor);
# Line 504 | Line 512 | begin
512    end;
513   end;
514  
515 + { TIBPackageNameProperty }
516 +
517 + procedure TIBPackageNameProperty.GetValues(Proc: TGetStrProc);
518 + var
519 +   StoredProc : TIBStoredProc;
520 +   i : integer;
521 + begin
522 +    StoredProc := GetComponent(0) as TIBStoredProc;
523 +    if StoredProc.Database = nil then
524 +      Exit;
525 +
526 +    with StoredProc do
527 +    try
528 +      for I := 0 to PackageNames.Count - 1 do
529 +        Proc (PackageNames[i]);
530 +    except on E: Exception do
531 +      MessageDlg(E.Message,mtError,[mbOK],0)
532 +    end;
533 + end;
534 +
535   { TIBIndexDefsProperty }
536  
537   procedure TIBIndexDefsProperty.Edit;
# Line 1041 | Line 1069 | begin
1069    Result := inherited GetVerbCount + 2;
1070   end;
1071  
1044 { TIBStoredProcParamsProperty }
1045
1046 procedure TIBStoredProcParamsProperty.Edit;
1047 var
1048  StoredProc: TIBStoredProc;
1049  Params: TParams;
1050 begin
1051  StoredProc := (GetComponent(0) as TIBStoredProc);
1052  Params := TParams.Create(nil);
1053  try
1054    StoredProc.CopyParams(Params);
1055  finally
1056    Params.Free;
1057  end;
1058  inherited Edit;
1059 end;
1060
1072   { TIBTableFieldLinkProperty }
1073  
1074   procedure TIBTableFieldLinkProperty.Edit;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines