Spec
Spec copied to clipboard
setting a block via `#enabled:` on a SpButtonPresenter raises `NonBooleanReceiver`.
To reproduce:
-
create a presenter composed of a list presenter and a button presenter.
-
sets an enabled block that returns true if an item is selected in the list:
confirmButton := self newButton
enabled: [
chestsTable selectedItem notNil ];
label: 'Confirm';
yourself.
-
open your presenter
-
NonBooleanReceiver
is raised
Expected behavior:
the documentation of SpAbstractWidgetPresenter>>#enabled:
says I can give a block as an argument so I expect to be able to do it without preventing my presenter to open.