hailanglove / opal

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

MultiChoice NullPointerException #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

I have a NullPointerException while setting the SelectionListener if I do not 
add data to the MultiChoice before:

        mcSL = new MultiChoice<PoJo>(main, SWT.NONE);
        mcSL.setNumberOfColumns(4);
        mcSL.setSeparator(" - ");
        gridData = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
        mcSL.setLayoutData(gridData);
        mcSL.setSelectionListener(new MultiChoiceSelectionListener<PoJo>(mcSL)
        {
            @Override
            public void handle(MultiChoice<PoJo> parent, PoJo receiver, boolean selected, Shell popup)
            {
            }
        });

Caused by: java.lang.NullPointerException
    at org.mihalis.opal.multiChoice.MultiChoice.updateSelection(Unknown Source)
    at org.mihalis.opal.multiChoice.MultiChoice.refresh(Unknown Source)
    at org.mihalis.opal.multiChoice.MultiChoice.setSelectionListener(Unknown Source)

Original issue reported on code.google.com by OliverRa...@googlemail.com on 12 Dec 2013 at 4:32

GoogleCodeExporter commented 9 years ago
Fixed in 0.9.8, thank you for the report !

Original comment by laurent....@gmail.com on 17 Dec 2013 at 8:50