NewTools
NewTools copied to clipboard
Add basic event support for setting events
Notes
This PR needs https://github.com/pharo-project/pharo/pull/17350 to be integrated in the Pharo image
Details
Introduces the following updates:
- Get the real value when getting a setting presenter from a setting declaration.
- Announce SettingUpdated on checkboxes only if the setting effectively changed.
- Fix checkboxes items always opening with the default value instead of the real value.
- Add announcer support in StSettingPresenterItem
StSettingsTrackerTest
✗ #testSettingUpdated (12ms)
TestFailure: Assertion failed
StSettingsTrackerTest(TestAsserter)>>assert:description:resumable:
StSettingsTrackerTest(TestAsserter)>>assert:description:
StSettingsTrackerTest(Object)>>assert:
[ : ann |
self assert: (tracker changedSettings includes: ann) ] in StSettingsTrackerTest>>testSettingUpdated ...assert: (tracker changedSettings includes: ann)
FullBlockClosure(BlockClosure)>>cull:
[ :ann |
numberOfAnnouncements := numberOfAnnouncements + 1.
aBlock cull: ann ] in StSettingsTrackerTest>>when:do:
FullBlockClosure(BlockClosure)>>cull:
FullBlockClosure(BlockClosure)>>cull:cull:
[ action cull: anAnnouncement cull: announcer ] in AnnouncementSubscription(AbstractAnnouncementSubscription)>>deliver: