Example 4: With Configuration

The Class

The toolWithConfig class is a simple example of a contributed tool with configuration logic.

API Documentation

Click HERE to view the API documentation for this class.

Source Code

Click Formatted HTML or Simple Text to view the source code for the class.

Do the Work

Run Action

The do_ActionPerformed() method has been modified to write a simple message to:

do_ActionPerformed:
	enter IExtCommand

	! write a message to the 'Console' view
	aReq=new("pvxrequestclient")
	aReq'print("Contributed tool: " + _obj'getDescription$() + " - Action completed.")
	drop object aReq

	! Finally, use standard ProvideX message box to display message
	msgbox "Example contributed tool - my work is complete.","Message"

return
Configure Action

The do_ConfigPerformed() method has been modified to write a simple message to:

do_ConfigPerformed:
	! write a message to the 'Console' view
	aReq=new("pvxrequestclient")
	aReq'print("Contributed tool: " + _obj'getDescription$() + " - Configuration completed.")
	drop object aReq

	msgbox "Example contributed tool - configuration is complete.","Message"

return

hasConfigAction:
	! Return True (1) since the configuration action logic has been implemented 
	return 1