[Seaside] Re: How to avoid too many callbacks
obi068 at gmail.com
Thu May 1 18:01:49 UTC 2008
Its already a fully working example!
Now with the simplification suggested by Lukas!
html heading: 'Callback Test'.
1 to: 100 do: [:idx | html anchor id: 'id_', idx asString;
with: idx. html space.
idx \\ 20 = 0 ifTrue: [html break]].
html div id: 'result'; with: [self renderResultOn: html].
self session addLoadScript: (html selector
do: [ :each | each element on: 'click' do: (html evaluator callback:
[:script | script element id: 'result'; update: [:r | self renderResultOn:
callback: [:v | self result: v] value: (SUStream new nextPutAll:
On Thu, May 1, 2008 at 6:39 PM, itsme213 <itsme213 at hotmail.com> wrote:
> "Gerhard Obermann" <obi068 at gmail.com> wrote in message
> > BTW the test result shows a good performance gain without the 100
> > callbacks.
> > Render Time (with 100 callbacks) : 29 ms
> > Render Time (with 1 callback) : 6 ms
> > File Size (with 100 callbacks): 20736
> > File Size (with 1 callback): 8611
> Wow, looks like I could do this in some places in my app. Any chance you
> could share the rest of this test/sample code?
> Always amazed by how much I do not know :)
> - Sophie
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside