Exactly! Works fine! I knew I wanted to invoke an action but didn't know I could pass a block closure as an argument to #replace: . THANKS! ---John<br><br><br><div class="gmail_quote">On Thu, May 21, 2009 at 11:13 AM, John Chludzinski <span dir="ltr"><<a href="mailto:john.chludzinski@gmail.com">john.chludzinski@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I'm trying to push PNG files as part of a "presentation app". I tried looking at CTCounter and using #update: as an example to follow. The method CTCounter>>update: sends the message SUElement>>update:. The instance of WAImageTag in my app that I'm trying to update (with a new PNG file) is given an id (by senting the message #id:). Using this id I tried to update the image:<br>
<br> self pusher javascript: [ :script |<br> script element<br> id: 'WWW';<br> update: (MMAFileLibrary / self getCurrentPageFile) asString]. "An instance of WAUrl."<br>
<br>
This failed. Tried using SUElement>>replace:<br><br> self pusher javascript: [ :script |<br> script element<br> id: 'WWW';<br> replace: (html image url: MMAFileLibrary / self getCurrentPageFile)]. "An instance of WAImageTag ."<br>
<br>This resulted in the string 'a WAImageTag' being pushed to other browsers.<br><br>Any ideas?<br><font color="#888888"><br>---John<br>
</font></blockquote></div><br>