rex_frame_message
Introduction
Each project is running in a frame, which could be addressed by a frame name in this plugin. Since iframe could be added into layout to run other project by URL, it is possible to have multiple frames in an environment.
This plugin could send or receive function calls from other frames, i.e. communicate between projects.
Each project is running in a frame, which could be addressed by a frame name in this plugin. Since iframe could be added into layout to run other project by URL, it is possible to have multiple frames in an environment.
This plugin could send or receive function calls from other frames, i.e. communicate between projects.
Frame name
Frame name could be set by "Frame name" at properties table, or changed by "Action:Set my frame name". Current frame name could be got by "Expression:MyFrameName".
Frame name could be set by "Frame name" at properties table, or changed by "Action:Set my frame name". Current frame name could be got by "Expression:MyFrameName".
Send function call
Call "Action:Call function" to execute a function on other frames. Set parameter "Receiver" to "" to broadcast this function call to all frames, include current frame.
Call "Action:Call function" to execute a function on other frames. Set parameter "Receiver" to "" to broadcast this function call to all frames, include current frame.
Receive function call
"Condition:On function" will be triggered while the frame name is equal to parameter "Receiver".
"Condition:On function" will be triggered while the frame name is equal to parameter "Receiver".
- Get parameters of this function call by "Expression:Param".
- The count of parameters could be read by "Expression:ParamCount".
- Frame name of sender could be read by "Expression:LastSender".
Return value
Call "Action:Set return value" under "Condition:On function" in receiver frame could send a value back to sender frame.
"Condition:On Return" will be triggered while sender frame received this return value, which could be read by "Expression:ReturnValue".
Call "Action:Set return value" under "Condition:On function" in receiver frame could send a value back to sender frame.
"Condition:On Return" will be triggered while sender frame received this return value, which could be read by "Expression:ReturnValue".
Log
Call "Action:Log" to log a message to the top frame console.
Call "Action:Log" to log a message to the top frame console.
Top frame
"Condition:Top frame" will return true if current frame is top frame. i.e. it is not in a iframe or a pop-up window.
"Condition:Top frame" will return true if current frame is top frame. i.e. it is not in a iframe or a pop-up window.
Example : communicate between main frame and child frame
Capx of main frame , Capx of child frame A , Capx of child frame B
Main frame has an iframe to load child frame, each child frame could be a level which made by a standalone capx.
Capx of main frame , Capx of child frame A , Capx of child frame B
Main frame has an iframe to load child frame, each child frame could be a level which made by a standalone capx.