-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
SpWindowPresenter>>okToChange returns true incorrectly #15646
Comments
Thanks for opening your first issue! Please check the CONTRIBUTING documents for some tips about which information should be provided. You can find information of how to do a Pull Request here: https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo
|
Includes workaround pharo issue pharo-project/pharo#15646, #okToChange returning true incorrectly. See correct implementation in JadeiteWindowPrsenter>>okToChange. Rename okToChangeSelections to `canDiscardEdits` to conform with spec2 naming and simpler code.
Thanks for your report. I will link it to the issue in the Spec project. |
Hi eric esteban replied on the spec issue. Please have a look. I will close this one to avoid duplication. |
Bug description
I believe this code is incorrect
To Reproduce
Implement a spec2 presenter where
canDiscardEdits
returns false and none of the window presenter's dependents returns false. The edits will be discarded anyway.Expected behavior
If the presenter returns false from
canDiscardEdits
, return false from the method because, if I understand the methodology, either the presenter or one of the window presenter's dependents can veto the change.I think
... self presenter canDiscardEdits ifFalse:[^false]. ...
is correct.Screenshots
None applicable
Version information:
Ubuntu 20.04
Pharo 11.0.0
Build information: Pharo-11.0.0+build.714.sha.0ead11d0b8573ff685db8a39fceeca2a8d528d3e (64 Bit)
Expected development cost
2 cents ... After all, it's just my opinion. :)
Additional context
None to add. It seems pretty straightforward.
The text was updated successfully, but these errors were encountered: