aah, ok. thanks for that.

I'll try that out, and see if I can get it to work.

Cheers, Bob.

On Aug 18, 11:13 pm, Thomas Broyer <[email protected]> wrote:
> On 18 août, 01:30, Bob The Cheese <[email protected]> wrote:
>
>
>
> > OK, so I'm making a custom type of table which manages a datastore,
> > has expandable sections, etc.
>
> > I've borrowed a couple of things off FlexTable, but modified/
> > simplified them.
>
> > When I run the project, I get this:
> > ==========
> > [ERROR] Failed to create an instance of 'vdc.module.billing.Billing'
> > via deferred binding
> > java.lang.NullPointerException: null
> >         at com.google.gwt.user.client.ui.HTMLTable$CellFormatter.access$0
> > (HTMLTable.java:373)
> >         at com.google.gwt.user.client.ui.HTMLTable.cleanCell(HTMLTable.java:
> > 1370)
> [...]
> > I compile the project out and run it in firefox, and pull up the error
> > here in the javascript:
> > ==========
> > function $setHTML(this$static, row, column, html){
> >         var td;
> >         $prepareCell(this$static, row, column);
> >         td = null.nullMethod();
> >         $internalClearCell(this$static, td, html == null);
> >         if (html != null) {
> >                 null.nullMethod();
> >         }}
>
> > ==========
>
> > in particular this line:
> > td = null.nullMethod();
>
> > I've looked around, and can't find anything which really explains to
> > me what's going wrong.
>
> Looking at the equivalent method in Java world:
>   public void setHTML(int row, int column, String html) {
>     prepareCell(row, column);
>     Element td = cleanCell(row, column, html == null);
>     if (html != null) {
>       DOM.setInnerHTML(td, html);
>     }
>   }
> ...
>   private Element cleanCell(int row, int column, boolean
> clearInnerHTML) {
>     // Clear whatever is in the cell.
>     Element td = getCellFormatter().getRawElement(row, column);
>     internalClearCell(td, clearInnerHTML);
>     return td;
>   }
>
> It looks like getCellFormatter() always return 'null' so the compiler
> translated the getRawElement(row,column) into 'null.nullMethod()' to
> cause a "null pointer exception" equivalent in JavaScript.
>
> What it means is that you never ever called setCellFormatter(...)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to