When the solution matters

Tips...

Registration Documentation Knowledgebase Seminars / Training Technical Support Partner Central

API/Plug-in Center

Tutorials

Adding Themes and Commands

The first thing a developer must decide is how each plug-in call will be configured. How many parameters will be passed into and out of the plug-in? Will the plug-in return a value? These questions should be answered before adding the commands to the plug-in. It is not a problem if you decide at a later time that you want to add another command or change the parameters to an existing command. We will explain how this is done in the section on "Editing an Existing Project."

Adding a Theme

First we want to add a Theme to the plug-in. This is accomplished by clicking on the Add Theme button.

screenshot

A dialog box will be displayed asking what the Theme's name will be.

screenshot

This is the name that will appear in the lower right-hand corner of the method editor in 4D. For our example we are using "Dim_Themes".

Steps to adding a command:

1. Click on the Add Command button.

screenshot

The following command dialog is displayed.

screenshot

Within this dialog the parameters to the plug-in are created. At the top of the dialog is where the name of the command is specified. Just to the right of the Command Name is the Return Value if there is one. If the Return Value is not specified, then the plug-in command will not return a value. This would be similar to the 4D command NEW PROCESS. The NEW PROCESS command returns the number of the newly created process.

2. (Optional) Click on the Return Type to specify what type of value is to be returned from the new command.

The parameters to a plug-in command are specified within the section called ParametersPlug-in. Some commands may not need any parameters. These would be similar to the BEEP command.

3. Click on the Add button, a parameter will be included in the parameters list.

The Remove Button deletes the parameter currently hightlighted. When a parameter has been added there are three areas that can be modified.

Modifiable areas of a Parameter

Type of parameter: By clicking on the type pop-up, the developer can specify if the parameter is to be a string, text, integer, real, and so on.

Direction of parameter: Sets the direction of the parameter. Things to consider are: Will this parameter send information into the plug-in?Will this parameter simply be used to return information? Or will the parameter do both?

Parameter name: The developer can modify the name of the parameter by double-clicking on the name.

4. When finished with the different parameters, simply click on the OK button. The command, with the parameters that the developer has specified, will be added to the source code.

Back 1 2 3 4 5 6 Next Step



International | Company | Contact 4D | Site Map | Privacy Policy | © 4D UK 1995-2008 | Change font size: [A] [A] [A] | Print this page