SourceForge.net Logo

 

GraphApplet1

Step 6 Link the parser and the variable

Now that the variable has a name, we need to tell the WCMParserBean about the variable, so that it can recognize an "x" when the user types one into a function definition.

Click on the WCMParserBean to select it (again, either its icon in the applet window or in the Java Beans tab),  click on the line for the mathObject1 property, click on the drop-down arrow, then select the WCMVariableBean from the list and press Enter.

adding a variable to a parser

You should then see something like the following:

variable set in a parser

This means that the parser now knows about this variable. As you can see, you can tell the parser about multiple variables by setting mathObject2, etc.

[Prev][Next]
[WebCompMath] [Examples] [GraphApplet1] [FunctionComposition]