-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Labels
Description
SpAbstractWidgetPresenter>>#enabled: is implemented as:
enabled: aBooleanOrValuable
"Set if the widget is enabled (clickable or focusable).
This can either be a boolean or a block returning a boolean."
enabled := aBooleanOrValuablebut SpAbstractWidgetPresenter>>#isEnabled is implemented as:
isEnabled
"Answer if presenter is enabled"
^ enabledso that
presenter := SpPresenter new.
button := SpButtonPresenter new
icon: (presenter iconNamed: #smallSave);
enabled: [ false ];
action: [ button inspect ];
yourself.
presenter layout: (SpBoxLayout newLeftToRight
add: button;
yourself).
presenter openfails with NonBooleanReceiver: proceed for truth.
SpAbstractWidgetPresenter>>#enabled: allows a aBooleanOrValuable argument, so the implementation of SpAbstractWidgetPresenter>>#isEnabled should be:
isEnabled
"Answer if presenter is enabled"
^ enabled valuePlease note that this bug makes code examples in the Spec book unusable. cc @Ducasse.