[Seaside] Re: SUPeriodical - changing the frequency on the fly
fsukhu at gmail.com
Sat Aug 19 02:25:12 UTC 2006
Here is the code that I am using:
--- start of code ---
"periodical and counter are instance vars"
periodical isNil ifTrue: [
"lazy initialization of periodical"
periodical := html periodical. periodical frequency: 10].
on: #renderNextImageOn: of: self).
"the first 5 times the frequency will be equal to 10 seconds after
that the frequency will be set to 30 seconds"
self counter > 5 ifTrue: [periodical frequency: 30]
ifFalse: [ counter := counter + 1].
html div id: 'FSTest'; with: [
--- end of code ---
I think that I am starting to see why this will not work and I am begining
to understand what you said. I suspect that SUPeriodical will only render
the paragraph containing the "script". Because the whole html page is not
frequency. Is this correct?
"Ramon Leon" <ramon.leon at allresnet.com> wrote in message
news:011b01c6c326$1d0cceb0$9700a8c0 at hq.allresnet.com...
> > Hello,
> > I am trying to change the frequency of aSUPeriodical on the
> > fly but what I am doing does not work. I create an instance
> > of SUPeriodical with a frequency of 10 seconds. That works
> > fine, the SUPeriodical is triggered every 10 seconds. I then
> > change the frequence of the same instance of SUPeriodical to
> > 30 seconds but it continues being triggered every 10 seconds.
> > I have examined the SUPeriodical instance and confirmed that
> > its frequency has been changed to 30.
> > Am I doing something wrong?
> > Thanks,
> > Frank
> Umm... I'm not sure you can do this. First off, as far as I know, these
> the rendering phase. Holding onto an instance and editing it will likely
> show your code to confirm?
More information about the Seaside