Hello, seasiders!
We would like to implement a GoogleReader-like table component which loads additional data to the table while scrolling down to (or near) the bottom. We tried #onScroll: event but it does not include position parameters for scroller. The possible decision is to implement a client-side script posting those parameters, but we are not sure how to do it in practice. Can anybody help us with it or maybe offer a better (simpler) solution for original task? Thanks in advance. -- Dennis Schetinin _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> We would like to implement a GoogleReader-like table component which
> loads additional data to the table while scrolling down to (or near) > the bottom. We tried #onScroll: event but it does not include position > parameters for scroller. The possible decision is to implement a > client-side script posting those parameters, but we are not sure how > to do it in practice. Note that onScroll: is not a standard event, so most certainly it won't work on all browsers. Never the less, you can try something like the following: html div id: 'info'. self session addLoadScript: (html scriptaculous event observe: html scriptaculous window on: 'scroll' do: (html updater id: 'info'; callback: [ :v | x := v ] value: (html scriptaculous window access: 'scrollX'); callback: [ :v | y := v ] value: (html scriptaculous window access: 'scrollY'); callback: [ :r | r render: x , ' x ' , y ])). Cheers, Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> > We would like to implement a GoogleReader-like table component which
> > loads additional data to the table while scrolling down to (or near) > > the bottom. We tried #onScroll: event but it does not include position > > parameters for scroller. The possible decision is to implement a > > client-side script posting those parameters, but we are not sure how > > to do it in practice. > > > Note that onScroll: is not a standard event, so most certainly it > won't work on all browsers. Never the less, you can try something like > the following: > > html div id: 'info'. > self session addLoadScript: (html scriptaculous event > observe: html scriptaculous window > on: 'scroll' do: (html updater > id: 'info'; > callback: [ :v | x := v ] value: (html scriptaculous > window access: 'scrollX'); > callback: [ :v | y := v ] value: (html scriptaculous > window access: 'scrollY'); > callback: [ :r | r render: x , ' x ' , y ])). > Thank you. We found this decision: (html div) ... onScroll: (html request callback: [:val | self halt] value: (SUStream on: 'this.scrollTop')); ... Does it have many drawbacks? -- Dennis Schetinin _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> (html div)
> ... > onScroll: (html request callback: [:val | self halt] > value: (SUStream on: 'this.scrollTop')); > ... > > Does it have many drawbacks? val in block will have the desired value -- Dennis Schetinin _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |