Updating function object in different applets via Javascript API
Answered
Hello everyone.
I have a question regarding communication between two applets via the Javascript API (similar to what is seen in this example).
In one of those applets I'd have a series of sliders and textboxes to control the parameters in the other applet. I am aware that I can update objects such as sliders and points using the setValue and setCoords methods present in the API, but I seem to be unable to do such thing with a function object.
I've tried using the methods above following the example above, also trying out with other methods like setTextvalue. Below is an extract of what I've tried.
function ggbOnInit(param) { if (param == "ggbApplet") { ggbApplet.registerObjectUpdateListener("f", "funcListener"); } } function funcListener(objName) { // get value from applet1 and set value in applet2 var changedValue = ggbApplet.getValueString(objName); ggbApplet2.setTextValue(objName, changedValue); }If anyone knows whether is possible or not to do such thing, I'd be grateful.
Thank you.
si pasa la función supongo que pasará como texto y entonces necesitaras usar un comando que incluya una instrucción parsetofunction ¿lo has intentado así?
How do you want the function to change exactly? ie what are the possible functions you want
si pasa la función supongo que pasará como texto y entonces necesitaras usar un comando que incluya una instrucción parsetofunction ¿lo has intentado así?
Try
then you can just do
Comments have been locked on this page!