Bogdanp / racket-gui-easy

Declarative GUIs in Racket.
https://docs.racket-lang.org/gui-easy/index.html
134 stars 18 forks source link

tabs: 'new-button (send tab-panel on-new-request) not implemented #19

Closed benknoble closed 2 years ago

benknoble commented 2 years ago

https://github.com/Bogdanp/racket-gui-easy/blob/831be1d3c466a0f6fe0e2e382be6fe801d81a936/gui-easy/gui/easy/scribblings/reference.scrbl#L190

The documentation mentions 'new-button, but the implementation does not yet support it. Fortunately I can add it to my application in other ways, so perhaps a quick update to the doc is all that is needed?

Bogdanp commented 2 years ago

Whoops, I closed this prematurely. I've changed the contract to allow 'new-button, but need to implement the hook still.

Bogdanp commented 2 years ago

OK, I've now pushed a change to handle the new button event. The action on tabs can now receive 'new events as well.

benknoble commented 2 years ago

Thanks!

Tangentially, I did learn from @mflatt (https://github.com/mflatt) that on macOS 'can-close only works with 'no-border, and it appears you cannot close the last tab, so depending on the desired behavior this may be another of those "add this behavior in other ways."