[Top] [Prev] [Next] [Bottom]
[Contents]
Activator Code
The Activator Code interface is the place where supporting C/C++ code for an Activator is added. Each Bound Activator maps to a function call in the generated CGI code. The Activator Code interface is a code template for this function.
Figure 2-29 The Activator Code Interface
About the Activator Code Interface
If you have a Sapphire project that allows a user to fill out an HTML form and then display the results to an HTML result template, you can display on your Web Browser what the user has selected.
Use the Sapphire Activator Code from the Object Bind Editor. In the "Function Initialization Code" initialize some variables and then assign these variables using SaGetInputValue. You can then use a simple printf statement to print the variables in the "
After the Object Binding Code"
by using the following sample code:
/* Start of initial Code */
char *var1, *var2, *var3;
var1=SaGetInputValue("formvar1");
var2=SaGetInputValue("formvar2");
var3=SaGetInputValue("formvar3");
/* Users Final Code is entered here */
printf("you entered the following: %s,%s,%s\n", var1,
var2, var3);
How to Invoke the Interface
- 1. The Project Window's Selected Activators Pop-up
- 2. The Project Window's Selected Activators Button Bar
- 3. The Object Bind Editor's Edit menu
- 4. The Object Bind Editor's
Activator Code
button
Text Editors
Note that in every occurrence of the button, a simple text editor is invoked. This text editor enables the developer to add large amounts of code more easily than entering directly into each code section. It also provides the ability to read an external test file and save it into the associated code section. The text editor is fixed and you cannot integrate your own. However, insertion of your preferred HTML tag editor is supported.
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.