Spec icon indicating copy to clipboard operation
Spec copied to clipboard

setting a block via `#enabled:` on a SpButtonPresenter raises `NonBooleanReceiver`.

Open adri09070 opened this issue 1 year ago • 0 comments

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 image

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.

adri09070 avatar Mar 23 '23 10:03 adri09070