[Seaside] help with #urlForAction:
jacaetevha at gmail.com
Tue Jul 19 15:36:54 CEST 2005
The thought (though not mentioned in code yet) was to be able to
cancel the action once you have started it. So, I would have a cancel
button on the page that could be pressed within the time limit and the
URL in the setTimeout would not be invoked.
Thanks for the comments though.
On 7/19/05, Yar Hwee Boon <hboon at motionobj.com> wrote:
> On 19-Jul-05, at PM 08:06, radoslav hodnicak wrote:
> > You are not using setTimeout correctly. The delay is the second
> > argument. And I don't think it can take an url as action.
> > On Mon, 18 Jul 2005, Jason Rogers wrote:
> >> Aside from the inherent security risks and what not...
> >> I have a method like this:
> >> renderShuttingDownOn: html
> >> | url |
> >> url := html
> >> urlForAction: [self shutDownTheImage].
> >> html
> >> div: [html text: 'Shutting down in 5 seconds.'].
> >> html script: 'setTimeout(5000, "' , url , '"); void 0;'
> >> The timeout is triggered after 5 seconds, but the block in the
> >> #urlForAction: message does not get executed. Is there something I am
> >> doing wrong here?
> Use a delay to send #shutDownTheImage. Why bother with setTimeout? :)
> (65) 6764-9774
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
"I am crucified with Christ: nevertheless I live; yet not I,
but Christ liveth in me: and the life which I now live in
the flesh I live by the faith of the Son of God, who loved
me, and gave himself for me."
More information about the Seaside