From: Jens F. <jfu...@us...> - 2006-01-03 15:19:10
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5439/run Modified Files: JvDBActions.pas Log Message: Added OnChangeDataComponent Event Index: JvDBActions.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvDBActions.pas,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** JvDBActions.pas 15 Sep 2005 10:19:42 -0000 1.29 --- JvDBActions.pas 3 Jan 2006 15:18:58 -0000 1.30 *************** *** 55,58 **** --- 55,60 ---- TComponentClass = class of TComponent; + TJvChangeDataComponent = procedure(DataComponent: TComponent) of object; + TJvShowSingleRecordWindowOptions = class(TPersistent) private *************** *** 98,105 **** --- 100,110 ---- private FDataComponent: TComponent; + FOnChangeDataComponent: TJvChangeDataComponent; protected procedure SetDataComponent(Value: TComponent); public procedure Notification(AComponent: TComponent; Operation: TOperation); override; + property OnChangeDataComponent: TJvChangeDataComponent read + FOnChangeDataComponent write FOnChangeDataComponent; published property DataComponent: TComponent Read FDataComponent Write SetDataComponent; *************** *** 178,181 **** --- 183,187 ---- FDataEngine: TJvDatabaseActionBaseEngine; FDataComponent: TComponent; + FOnChangeDataComponent: TJvChangeDataComponent; protected procedure SetDataComponent(Value: TComponent); *************** *** 204,207 **** --- 210,215 ---- property DataSource: TDataSource Read GetDataSource; property DataSet: TDataSet Read GetDataSet; + property OnChangeDataComponent: TJvChangeDataComponent read + FOnChangeDataComponent write FOnChangeDataComponent; published property OnExecute: TJvDatabaseExecuteEvent Read FOnExecute Write FOnExecute; *************** *** 521,524 **** --- 529,534 ---- if Actions[I] is TJvDatabaseBaseAction then TJvDatabaseBaseAction(Actions[I]).DataComponent := Value; + if Assigned(OnChangeDataComponent) then + OnChangeDataComponent (Value); end; *************** *** 1095,1098 **** --- 1105,1110 ---- else FDataEngine := nil; + if Assigned(OnChangeDataComponent) then + OnChangeDataComponent (Value); end; |