On Fri, Mar 27, 2009 at 1:53 AM, Steven Noble <span dir="ltr"><<a href="mailto:steven.noble@gmail.com">steven.noble@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What I'm attempting to do is something like<br>
<br>
html button<br>
text: 'add put option';<br>
onClick: (html jQuery ajax<br>
script: [:s |<br>
s << (s jQuery id: 'options') append: (self someRenderFunction on:<br>
(s canvas)).<br>
"some dynamically generated js"]).<br>
<br>
Of course this doesn't work because 'append:' expects something that<br>
behaves like a string. But is there a way I can put some escaped html<br>
generated by a canvas in my dynamically generated js?<br>
</blockquote><div><br>I think this won't work anyway because the canvas is for an old render context. In fact, we've been talking about refactoring so that the JSObjects only hold a render context or something instead of the canvas but it's unclear if that will happen in this release cycle (I suspect not).<br>
<br>I think you ought to be able to use a Builder to get a canvas to use here. It can then give you back a string. I think it's mostly geared around passing whole components into it but you can probably get at the canvas and pass it somewhere... look for sender of #builder and see if you can work it out.<br>
<br>If not, I'm sure Lukas will have a much better solution for you tomorrow anyway. ;)<br><br>Julian<br></div></div><br>