<div>Hi Nick</div>
<div>I found it works if I remove the "second" i.e. frequency: 1;</div>
<div>In a workspace you can print "1 second" to see why it probably causes trouble.</div>
<div> </div>
<div>Also, you do not want to send super initialize in a *class* initialize method. Just "one of those things". You can probably search the list archives to get a better explanation.</div>
<div> </div>
<div>Happy Trails</div>
<div>John<br><br></div>
<div class="gmail_quote">On Mon, Aug 13, 2012 at 10:19 AM, Nick Brown <span dir="ltr"><<a href="mailto:nickbrown@fastmail.fm" target="_blank">nickbrown@fastmail.fm</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Hello folks.<br><br>I'm modifying a seaside application of mine so that parts of the UI will<br>periodically poll to see if anything's changed. I had a look at the<br>
relevant section of the online seaside book, and it seems like<br>PTPeriodical is exactly what I want. Unfortunately I can't even get the<br>book's code example to work for me, so hopefully somebody can tell me<br>
what I'm doing wrong.<br><br>I'm using the current Seaside/Pharo v3.0.7 one-click image from<br><a href="http://seaside.st/" target="_blank">seaside.st</a>, and current stable releases of Firefox and Chrome (on<br>
Windows). The following, applied to a fresh image, illustrates my<br>problem:<br><br>I create a WAComponent subclass, called MyTest.<br><br>I give it a class initialization method as follows:<br><br>initialize<br> super initialize.<br>
(WAAdmin register: self asApplicationAt: 'mytest')<br> addLibrary: PTDeploymentLibrary;<br> addLibrary: SUDeploymentLibrary.<br><br>(taken from<br><a href="http://book.seaside.st/book/web-20/scriptaculous/frameworks/library" target="_blank">http://book.seaside.st/book/web-20/scriptaculous/frameworks/library</a> )<br>
And renderContentOn: as follows:<br><br>renderContentOn: html<br> html div<br> script: (html scriptaculous periodical<br> frequency: 1 second;<br> callback: [ :ajaxHtml | ajaxHtml render: Time<br>
now ]<br> );<br> with: Time now.<br><br>(taken from<br><a href="http://book.seaside.st/book/web-20/scriptaculous/ajax/background" target="_blank">http://book.seaside.st/book/web-20/scriptaculous/ajax/background</a> )<br>
<br>I manually call the class initialzation method to register the<br>application, then visit it in a browser. I can see that the time does<br>update, but only once. Wireshark confirms only a single XMLHttpRequest<br>is coming back from the browser.<br>
<br>I'm afraid my Javascript debugging skills are largely non-existant, but<br>certainly the browser's JS console shows no errors or warnings.<br><br>I've tried explicitly calling #start on the PTPeriodical instance, in<br>
which case I then get two XMLHttpRequests back from the browser in quick<br>succession, but still no ongoing periodical updates.<br><br>Grateful for any advice.<br><br>Cheers,<br>Nick Brown<br>_______________________________________________<br>
seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br><a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br>