vg_extendedaction


vg_security.pbl   >   vg_n_cst_vgmanager   >   vg_extendedaction   

Full name vg_n_cst_vgmanager.vg_extendedaction
Access public
Extend of integer
Return value integer
Prototype event integer vg_extendedaction(powerobject,string,string)

Name Datatype
No Data

Name Datatype
No Data

event vg_extendedaction;/*_____________________________________________________________________________
Description	:	Empty user event into which you place code that performs processing just after Visual Guard executes action.
Comment		:	This event is used to add your application-specific actions or extend Visual Guard standard actions.
Example		:	
The following example extends the standard actions 'disable column' and 'enable column' and add a specific 
action 'change ini filename'.

		datawindow ldw_target
		string ls_column
		CHOOSE CASE as_action
		CASE "disable column" // Extend 'disable column' action
			// Verify if the type of the target object is correct for this action
			IF TypeOf (apo_target_object) = datawindow! THEN
				// This action can disable a group of columns. Each column is separated by comma.
				DO WHILE as_param <> ""
					ls_column = vg_f_get_token(as_param,",")
					ldw_target = apo_target_object
					// Make the column's background opaque
					IF ldw_target.Modify (ls_column + ".Background.Mode='0'") <> "" THEN 
						Return -1
					END IF
				LOOP
				Return 1
			ELSE
				Return -1
			END IF
		CASE "enable column" // Extend 'enable column' action
			// Verify if the type of the target object is correct for this action
			IF TypeOf (apo_target_object) = datawindow! THEN
				// This action can disable a group of columns. Each column is separated by comma.
				DO WHILE as_param <> ""
					ls_column = vg_f_get_token(as_param,",")
					ldw_target = apo_target_object
					// Make the column's background transparent
					IF ldw_target.Modify (ls_column + ".Background.Mode='0'") <> "" THEN 
						Return -1
					END IF
				LOOP
				Return 1
			ELSE
				Return -1
			END IF
		CASE	"change ini filename" // Add a specific action
			IF FileExists (as_param) THEN 
				// Change the global variable in your application
				gs_ini_filename = as_param
				Return 1
			ELSE
				Return -1
			END IF
		END CHOOSE
		// Unknown action 
		Return 2

Arguments	:	apo_target_object : The target object on which the action must be processed.
					as_action 			: string containing the name of the action 
					as_param 			: string containing parameters of action. Each parameter is separated by comma.
Return		:	integer -1 if the action is failed, 2 if the action is unknown, 1 otherwise.
Historique	:	
					V7.50 - HC - 07/06/2000 - Initial version.
_____________________________________________________________________________*/


return 2
end event

     
Name Owner
No Data

     
Name Owner
No Data

     
Full name
No Data

     
Name Scope
No Data