Example 1: No Configuration

The Class

The ActionListenerExample class is a simple example of a contributed tool that does not have any 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

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

do_ActionPerformed:
	enter IExtCommand

	/*
	 * Write a short message to the Plug-in debug EventLog
	 */
	_eventLog=new("ErrorLogBuilder",_pvxConstants,ViewManager)
	_eventLog'bufferInit()
	_eventLog'bufferAddText("Contributed tool: "+_obj'getDescription$()+$0A$)
	_eventLog'bufferWriteText()
	drop object _eventLog

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

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

return