Is it possible for TideSDK to handle something similar to:
<script type="text/javascript">
function foo(answer) {
$('#the_answer').text(answer)
}
</script>
<script type="text/ruby">
class Bar
def bar()
[ .... do some lengthly analysis .... ]
@the_found_answer = 42
foo(@the_found_answer)
end
window.bar = Bar.new()
, so that processing is done by Ruby scripts and libraries, but presentation is handled by Javascript scripts?
Update: I think I found what was wrong in my code, which was the lack of scope for function invocation. Instead of:
foo(@the_found_answer)
I needed to do something like:
the_window = Ti.UI.getMainWindow()
the_domwindow = the_window.getDOMWindow()
the_domwindow.foo(@the_found_answer)
, am I right? (I didn't find any other way of getting hold of the DOM window.)