Menu

#13 NPE in InternalDockingUtil on MacOS X

open
nobody
5
2006-08-03
2006-08-03
Daniel Frey
No

A NPE is thrown on MacOS X when Docking Windows 1.4.0
is used. The exception gets thrown in several
occasions, all leading to a NPE starting from
InternalDockingUtil.updateButtons. The exception is
nonly reproducible on MacOS X running Java 5, not on
Windows XP SP2.

Discussion

  • Daniel Frey

    Daniel Frey - 2006-08-03

    4 different stacktraces leading to the same error

     
  • Daniel Frey

    Daniel Frey - 2006-08-03

    Logged In: YES
    user_id=140786

    Here is the code, that leads to the NPE at the line where
    the new tab window is created:

    public static RootWindow createParentChildDisplay(final
    JComponent listPanel, final ViewMap views) {

    final TabbedPanel tabbedPanel = new TabbedPanel();
    tabbedPanel.addTab(new Tab(listPanel));

    final View listView = new View("", null, tabbedPanel);
    listView.getViewProperties().setAlwaysShowTitle(false);

    views.addView(0, listView);

    final RootWindow rootWindow =
    DockingUtil.createRootWindow(views, true);
    setBasicRootWindowProps(rootWindow);
    configureProperties(rootWindow, false, false, false,
    false, false, false);

    final RootWindowProperties rootWindowProperties =
    rootWindow.getRootWindowProperties();
    final TabWindowProperties properties =
    rootWindowProperties.getTabWindowProperties();

    tabbedPanel.getProperties().addSuperObject(properties.getTabbedPanelProperties());

    // Make sure to create the TabWindow AFTER the
    RootWindow, otherwise the content will be empty!
    final View[] windows = (View[])
    ArrayUtils.remove(toArray(views), 0, new View[0]);
    final TabWindow rightTabs = new TabWindow(windows);
    rightTabs.setSelectedTab(0);

    rootWindow.setWindow(new SplitWindow(true, listView,
    rightTabs));

    rootWindowProperties.getWindowAreaProperties().setBackgroundColor(rootWindowProperties.getComponentProperties().getBackgroundColor());

    return rootWindow;
    }

     
  • Daniel Frey

    Daniel Frey - 2006-08-14

    Logged In: YES
    user_id=140786

    With version 1.3 it workes without any problem.

     

Log in to post a comment.

Monday.com Logo