pharo-spec / Spec

Spec is a framework in Pharo for describing user interfaces.
MIT License
62 stars 65 forks source link

Fix: #1547: whenWillCloseDo: block is evaluated twice when closing a window #1566

Closed Ducasse closed 2 months ago

Ducasse commented 4 months ago

We decided to remove the closeDiscardingChanges from Spec

Ducasse commented 4 months ago

This is a potential backport to P12.

estebanlm commented 4 months ago

please do not merge this, I let a comment in the reported issue.

MarcusDenker commented 4 months ago

What is important, too: please add a better name tan "Fix: #1547" (this looks very bad in the weekly email, too)

Ducasse commented 2 months ago

Right now the code of the book breaks.

estebanlm commented 2 months ago

Right now the code of the book breaks.

can you point me to the example that breaks ?

Ducasse commented 2 months ago

@koendehondt Do you remember this is in the window chapter?

koendehondt commented 2 months ago

Right now the code of the book breaks.

can you point me to the example that breaks ?

The example in the description of https://github.com/pharo-spec/Spec/issues/1547 exposes the bug.

The code in the book is in section 9.3 "Preventing window close". The corresponding code is in class WindowExamplePresenter2 in the code repo. The class comment links to https://github.com/pharo-spec/Spec/issues/1547 to indicate that the example does not work.

estebanlm commented 2 months ago

This is fixed upstream (I applied same thing)

koendehondt commented 2 months ago

This is fixed upstream (I applied same thing)

Could you post the commit here? Thanks.