Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-241

Clicking on a MenuBar.Item with no menu yields exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: wtk
    • Labels:
      None

      Description

      Create a frame with a menu bar as follows:

      <Frame maximized="true"
      styles="

      {showWindowControls:false}

      "
      xmlns:wtkx="http://pivot.apache.org/wtkx"
      xmlns="org.apache.pivot.wtk">
      <menuBar>
      <MenuBar>
      <items>
      <MenuBar.Item buttonData="Foo" />
      </items>
      </MenuBar>
      </menuBar>
      <content>
      ...
      </content>
      </Frame>

      Then click on the "Foo" menu bar item, and you'll get the following exception:

      java.lang.RuntimeException: Infinite loop in focus traversal policy for org.apache.pivot.wtk.MenuPopup#105
      at org.apache.pivot.wtk.Container.requestFocus(Container.java:446)
      at org.apache.pivot.wtk.skin.MenuBarItemSkin.stateChanged(MenuBarItemSkin.java:204)
      at org.apache.pivot.wtk.Button$ButtonStateListenerList.stateChanged(Button.java:217)
      at org.apache.pivot.wtk.Button.setState(Button.java:470)
      at org.apache.pivot.wtk.Button.setSelected(Button.java:412)
      at org.apache.pivot.wtk.skin.MenuBarItemSkin.mouseDown(MenuBarItemSkin.java:157)
      at org.apache.pivot.wtk.Component$ComponentMouseButtonListenerList.mouseDown(Component.java:443)
      at org.apache.pivot.wtk.Component.mouseDown(Component.java:2494)
      at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
      at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
      at org.apache.pivot.wtk.Window.mouseDown(Window.java:1123)
      at org.apache.pivot.wtk.Container.mouseDown(Container.java:719)
      at org.apache.pivot.wtk.ApplicationContext$DisplayHost.processMouseEvent(ApplicationContext.java:787)
      at java.awt.Component.processEvent(Component.java:6028)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

        Attachments

          Activity

            People

            • Assignee:
              gbrown Gregory K. Brown
              Reporter:
              tvolkert Todd Volkert
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: