VcsBeginAction
Return to Introduction  Previous page  Next page
To allow grouping of multiple actions, this method will be called (if present) before a group of actions occur.

procedure VcsBeginAction( ActionRef: Integer; Action: Word ); stdcall; export;  

This method could be used to, for example, allocate resources that will be used when a set of actions will occur. VcsEndAction will always be called after a group of actions have occurred. Note that all actions for any ActionRef will be of the same type.

Parameters

Name
Description
ActionRef
A unique value that identifies the group of actions
Action
The type of action about to start. See TCVcsConst.pas for a list of the action types.


Example (Delphi)

var  
  PromoteLog: TStrings = nil;  
 
procedure VcsBeginAction( ActionRef: Integer; Action: Word );  
begin  
  // This procedure is called just before an action is carried out on multiple  
  // files. ActionRef is a unique number passed into the procedure and allows   
  // you to group multiple calls to VcsBefore... and VcsAfter... events.  
  // See the file TCVcsConst for the act_XXXX values passed in the Action parameter  
  if ( Action = act_Promote ) and ( not Assigned( PromoteLog ) ) then  
    PromoteLog := TStringList.Create;  
end;  

 


© 1995-2018 MCN Software