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:
self pusher javascript: [ :script | script element id: 'WWW'; update: (MMAFileLibrary / self getCurrentPageFile) asString]. "An instance of WAUrl." This failed. Tried using SUElement>>replace: self pusher javascript: [ :script | script element id: 'WWW'; replace: (html image url: MMAFileLibrary / self getCurrentPageFile)]. "An instance of WAImageTag ." This resulted in the string 'a WAImageTag' being pushed to other browsers. Any ideas? ---John _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hello, I tested this and it worked.
html image id: 'lala'; url: SUAllTestLibrary / #logoGif. html anchor onClick: (html element id: 'lala'; replace: [:render | render image id: 'lala'; url: SUAllTestLibrary / #demoGif]); with: 'change'. So I suppose that your error is that you didn't use a block to render the new image. Hope that helps Santiago 2009/5/21 John Chludzinski <[hidden email]> 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: _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by John Chludzinski
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
On Thu, May 21, 2009 at 11:13 AM, John Chludzinski <[hidden email]> wrote: 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: _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |