Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog.addCollapseListener(CollapseHandler) should be called addCollapseHandler(CollapseHandler) #904

Closed
mP1 opened this issue Jan 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mP1
Copy link

mP1 commented Jan 4, 2024

IM using a Dialog and i wanted to know when the user closed a dialog via ESC etc.

My code had a fragment similar to

Dialog.create()
  .addCollapseListener(this::onClose)

But my onClose was not being called.

Turns out there are two overloads:

  • addCollapseListener(CollapseHandler)
  • addCollapseListener(CollapseListener)

My bad luck was i thought the compiler was passing my method reference to Dialog.addCollapseListener(CollapseListener) , but i was actually registering a CollapseHandler to Dialog.addCollapseListener(CollapseHandler) and CollapseHandlers are not fired by Dialog.close/onClose.

@vegegoku vegegoku self-assigned this Jan 14, 2024
@vegegoku vegegoku added the bug Something isn't working label Jan 14, 2024
@vegegoku vegegoku added this to the 2.0.0 milestone Jan 14, 2024
vegegoku added a commit that referenced this issue Jan 15, 2024
@vegegoku
Copy link
Member

The old interface have been deprecated and a new interface with more accurate naming is added, instead of expand/collapse now uses Open/Close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants