Hi
Does anyone have an example on how to use the Scriptaculous parallel: message? Thanks, JP _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Does anyone have an example on how to use the Scriptaculous parallel:
> message? Try something like: html anchor id: 'anchor'; onClick: (html effect parallel: { html effect id: 'anchor'; highlight. html effect id: 'anchor'; move: 100 @ 200. html effect id: 'anchor'; scale: 4 }; with: 'Parallelize Me' The 3 effects will be executed in parallel. I don't exactly know why script.aculo.us provides the parallel effect, after all simply concatenating the effects would execute them in parallel as well as they are processed asynchronously. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> html anchor
> id: 'anchor'; > onClick: (html effect parallel: { > html effect id: 'anchor'; highlight. > html effect id: 'anchor'; move: 100 @ 200. > html effect id: 'anchor'; scale: 4 }; > with: 'Parallelize Me' > > The 3 effects will be executed in parallel. I don't exactly know why > script.aculo.us provides the parallel effect, after all simply > concatenating the effects would execute them in parallel as well as > they are processed asynchronously. Btw, the script.aculo.us wiki usually has a bunch of good examples and documentation. Of course all in JavaScript, but I am sure it is easy to engineer it back to Smalltalk code ;-) http://wiki.script.aculo.us/scriptaculous/show/Effect.Parallel -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Lukas Renggli
Lukas Renggli wrote:
>> Does anyone have an example on how to use the Scriptaculous parallel: >> message? > > Try something like: > > html anchor > id: 'anchor'; > onClick: (html effect parallel: { > html effect id: 'anchor'; highlight. > html effect id: 'anchor'; move: 100 @ 200. > html effect id: 'anchor'; scale: 4 }; > with: 'Parallelize Me' > > The 3 effects will be executed in parallel. I don't exactly know why > script.aculo.us provides the parallel effect, after all simply > concatenating the effects would execute them in parallel as well as > they are processed asynchronously. > > Cheers, > Lukas > Thanks Lukas. Would you concatenate the effects like this?: html anchor onClick: (html effect id: 'theid'; toggleAppear); onClick: (html effect id: 'theid'; highlight); with: 'appear and highlight'. At least this works too. JP _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Would you concatenate the effects like this?:
> > html anchor > onClick: (html effect > id: 'theid'; > toggleAppear); > onClick: (html effect > id: 'theid'; > highlight); > with: 'appear and highlight'. Yes exactly. Another possibility would be to write it using the #, operator: html anchor onClick: (html effect id: 'theid'; toggleAppear) , (html effect id: 'theid'; highlight); with: 'appear and highlight'. Both versions should produce exactly the same JavaScript code. Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |