Quick Start Guide: developing custom module |
Note: this document provides step-by-step guide for simple custom module creation. For a complete information about Pronto API see Pronto documentation.
Pronto provides API that allows to add custom blocks of functionality into it. This blocks are called modules. Basic Pronto module consists of several files and resides in CommuniGate Pro server Skins (usually in "Pronto-" skin).
This guide provides instructions about how to create basic custom module, develop, debug and deploy it.
Note: all files used in this guide like debug build of Pronto can be found at http://communigate.com/CommuniGatePro/ProntoModuleAPI.html.
Note: make sure to use Flex SDK 3.2.0. More on module restrictions.
Visit downloads page on eclipse.org, download and install suitable package (now it is Eclipse Classic 3.5.0).
Visit Flex Builder page on abode.com, download Flex Builder as Eclipse plug-in (try or buy it) and install.
Open project properties and disable HTML wrapper generation:
Now close your project and open system file browser (ex. Explorer for Windows). Locate
docs.tar.gz\Admin\API\Examples.tar.gz:

The fastest way to do this is to use "Replace All" option in "Search" tool (Ctrl + H).
Flex Builder will report several compiling errors. They all are about wrong naming, fix them.
At this moment your project should compile without errors and have the following structure:
Admin/API/Debug.tar.gz archive into new folder pronto in your project. It should contain default.html,
pronto.swf and other files and folders. It is debug build of Pronto.

<debug>
<!-- Change server to your own -->
<server host="talktoip.com" port="8100" secure="no"/>
<modules>
<!-- List modules that you want to debug here -->
<module src="C:/Workspace/Billing/bin-debug/billing.def"
basePath="C:/Workspace/Billing/bin-debug/" />
</modules>
</debug><module moduleId="com.companyAbc.billing.Billing" fileName="billing.swf" version="1" loadType="onDemand"> <requirements> <requirement option="HTTP"/> </requirements> <extensions> <extension extensionName="com.companyAbc.billing.Billing" extensionPointName="MainNavigator" preferredIndex="33" iconFileName="billingicon.png" label="Billing"/> </extensions> </module>
Now you can start "Billing" project debug.
It is security of IE. To avoide this problem in debug mode: Tools -> Internet options -> Advanced -> Security -> Allow active content to run in files on My Computer.
Check debugconfig.xml and .def files.
Pronto logs most important actions during initialization in it's own log, click somewhere inside Pronto and press Ctrl + F12 to open "Log" window.
Server provides dictionary of localized strings for many languages. You can view english strings using URL like http://server.com/SkinFiles/server.com/Pronto-/strings.xdata, for other languages strings.xdata should be changed to the language name ex. arabic.xdata.
Module usually access strings using getString() function from ProntoLib library.
ProntoLib class Utils.as contains methods to work with dates and many more.