pyglet-gui icon indicating copy to clipboard operation
pyglet-gui copied to clipboard

Bug on dropdown example

Open jorgehatccrma opened this issue 10 years ago • 0 comments

In examples/dropdown.py everything works as expected, but when selecting an option in the dropdown list, I get this traceback:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 314, in 'calling callback function'
  File "/usr/local/lib/python2.7/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1121, in objc_method
    result = f(py_self, *args)
  File "/usr/local/lib/python2.7/site-packages/pyglet/window/cocoa/pyglet_view.py", line 245, in mouseDown_
    self._window.dispatch_event('on_mouse_press', x, y, buttons, modifiers)
  File "/usr/local/lib/python2.7/site-packages/pyglet/window/__init__.py", line 1155, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
  File "/usr/local/lib/python2.7/site-packages/pyglet/event.py", line 355, in dispatch_event
    if handler(*args):
  File "/Users/jorgeh/Documents/development/pyglet-gui/pyglet_gui/manager.py", line 383, in on_mouse_press
    retval = ControllerManager.on_mouse_press(self, x, y, button, modifiers)
  File "/Users/jorgeh/Documents/development/pyglet-gui/pyglet_gui/manager.py", line 290, in on_mouse_press
    return self._focus.on_mouse_press(x, y, button, modifiers)
  File "/Users/jorgeh/Documents/development/pyglet-gui/pyglet_gui/manager.py", line 290, in on_mouse_press
    return self._focus.on_mouse_press(x, y, button, modifiers)
  File "/Users/jorgeh/Documents/development/pyglet-gui/pyglet_gui/option_selectors.py", line 26, in on_mouse_press
    self.parent.layout()
AttributeError: 'NoneType' object has no attribute 'layout'

This is a non-crashing error (I can keep interacting with the window afterwards), but I get the same error every time I select an option in the dropdown.

jorgehatccrma avatar Oct 16 '14 08:10 jorgehatccrma