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)
        at com.google.gwt.user.client.ui.HTMLTable.setHTML(HTMLTable.java:
1006)
        at vdc.module.billing.clients.invoices.widget.InvoiceGrid.<init>
(InvoiceGrid.java:18)
        at vdc.module.billing.clients.invoices.Invoices.makeInvoiceGrid
(Invoices.java:169)
        at vdc.module.billing.clients.invoices.Invoices.<init>(Invoices.java:
110)
        at vdc.module.billing.clients.Clients.<init>(Clients.java:66)
        at vdc.module.billing.Billing.<init>(Billing.java:43)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate
(ModuleSpace.java:373)
        at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:318)
        at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace
(BrowserWidget.java:343)
        at com.google.gwt.dev.shell.moz.BrowserWidgetMoz.access$100
(BrowserWidgetMoz.java:35)
        at com.google.gwt.dev.shell.moz.BrowserWidgetMoz
$ExternalObjectImpl.gwtOnLoad(BrowserWidgetMoz.java:58)
        at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
Method)
        at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:
1428)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
        at com.google.gwt.dev.SwtHostedModeBase.processEvents
(SwtHostedModeBase.java:235)
        at com.google.gwt.dev.HostedModeBase.pumpEventLoop
(HostedModeBase.java:558)
        at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
        at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
==========

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.

Here are the methods that I've overwritten

==========
@Override
protected void prepareRow(int row) {
        if (row < 0) {
                throw new IndexOutOfBoundsException(
                        "Cannot create a row with a negative index: " + row);
        }

        int rowCount = getRowCount();
        for (int i = rowCount; i <= row; i++) {
                insertRow(i);
        }
}

@Override
protected void prepareCell(int row, int column) {
        prepareRow(row);
        if (column < 0) {
                throw new IndexOutOfBoundsException(
                        "Cannot create a column with a negative index: " + 
column);
        }

        int cellCount = getCellCount(row);
        for (int i = cellCount; i < column; i++) {
                insertCell(row, i);
        }
}

@Override
public int getCellCount(int row) {
        if (row < 0) {
                throw new IndexOutOfBoundsException(
                                "Cannot find a row with a negative index: " + 
row);
        }

        // Initialize - 0 cells in a row
        int count = 0;

        // check if the row exists yet
        int rows = getRowCount();
        if (rows >= row) {
                count = getDOMCellCount(row);
        }

        return count;
}

// and the constructor
public InvoiceGrid () {
        // set the headers
        setHTML(0,0,"&nbsp;");
        setText(0,1,"Invoice Number");
        setText(0,2,"Client Name");
        setText(0,3,"Invoice Date");
        setText(0,4,"Due Date");
        setText(0,5,"Terms");
        setText(0,6,"Ageing");
        setText(0,7,"Amount");
        setText(0,8,"Status");
}
==========

Can anyone help me with this? Any clues as to what I've done wrong
here?

Thanks guys.

--~--~---------~--~----~------------~-------~--~----~
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