BEE Script: ObjName%funcname [name=value ...];
BEE Tag: <beeObjName%funcname [name=value ...]>
When calling a function in the above format, it will first find the function funcname from the object ObjName. The object's function needs to be set in the constructor using var this%function:funcnam = "actual_function_name";, where the actual_function_name is a name defined with the "function" command.
If the function name of the object is not set, the actual function of the same name will be called.
There are three extra arguments that can be accessed within the function: arg%function:this, which evaluates to ObjName, arg%function:thisfunction, which evaluates to funcname, and arg%function:function, which evaluates to actual_function_name.
For example, if the object "myobj" gets var this%function:mymethod = 'myfunc'; and the method is invoked with myobj%mymethod a=1 b=2; then:
arg%function:a |
1 |
arg%function:b |
2 |
arg%function:this |
myobj |
arg%function:thisfunction |
mymethod |
arg%function:function |
myfunc |
arg%a |
1 |
arg%b |
2 |
arg%this |
myobj |
arg%thisfunction |
mymethod |
Note: ObjName can contain BEE Variables. However, the current version of the parser handle BEE Variable as ObjName only if there is no space, ">" or "]" in the variable syntax. e.g. {v}%func; is OK, but {v|replace: ,x}%func is not because of the space in the conversion argument. Also, funcname cannot contain an "%" in its syntax.
|