kxgames / glooey

An object-oriented GUI library for pyglet.
MIT License
91 stars 6 forks source link

dialog.set_ok_button doesn't seem to work #52

Closed UplinkPhobia closed 3 years ago

UplinkPhobia commented 3 years ago

So, I was playing around with dialogs, and since I didn't want to use inner classes, I tried setting the ok_button of an OkDialog with the set_ok_button method, but it crashed with a pyglet.event.EventException: Unknown event "on_click_ok"

The following code should work (since it's replacing the ok button with itself), and yet it raises the same exception:

import pyglet
import glooey

win = pyglet.window.Window(800, 600)
gui = glooey.Gui(win)

okdiag = glooey.OkDialog()
okdiag.open(gui)
okdiag.set_ok_button(okdiag.get_ok_button())
kalekundert commented 3 years ago

Thanks for the report. I think this should be fixed now; let me know if it's not.