nihad640 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

getBodyScrollTop throws an exception, need change Integer to int #637

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I use grid.getBodyScrollTop(), I always get an exception.

But I wrote my own version of the function:

public native int myGetBodyScrollTop() /*-{
  var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();
  var body = self.body;
  if (body==null) return 0;
  return body.getScrollTop();
}-*/;

This function works fine. Note that I used "int" instead of Integer.

Original issue reported on code.google.com by yury.fin...@gmail.com on 27 Oct 2011 at 8:27

GoogleCodeExporter commented 9 years ago
Thanks for the heads up and the suggested fix.
We've applied a similar change to our mainline codebase - it will show up in 
the nightly builds going forward

Original comment by smartgwt...@gmail.com on 28 Oct 2011 at 3:30