This is my first post here, so please forgive me if I fail at etiquette somewhere along the way.
I am working on a POC dealing with animating a visualization within Tibc
this does not directly answer your question but provides you with a method of creating a timer that can interact with document properties. sorry that I don't have time to provide an explicit answer. as such feel free not to mark it accepted -- maybe someone else has a better one.
the reason that your code doesn't work is because the IronPython engine locks Spotfire until execution is completed. you're not far off in assuming that the visualization doesn't update: in fact the entire application doesn't update! you can test this as I mentioned in my comment by setting the sleep value to 1 second.
I created this DXP some time ago to illustrate how to allow IronPython and Javascript code to interact with each other inside of textareas. the IP->JS page should give you some clues on how to build your animation solution.
what's going on behind the scenes here:
allows the user to enter text
- a Javascript function called
update
runs periodically: var timer = setInterval(update, 1000);
- the
update
function uses JQuery to access the input area via its parent : var text_in = $("#input_container").text();
update
finally replaces the text in an "output" container with the modified text: $("#output_container").html(rainbowize(text_in));
you can modify this example to use JQuery to output to a document property-linked input area. in other words, use the Javascript timer setInterval()
instead of time.sleep()
.
I hope I've done a decent job of explaining that. let me know if it was unclear :)
讨论(0)
- 热议问题