-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update after selection in Color Picker #766
Update after selection in Color Picker #766
Conversation
… the Color Picker window. Remove unnecessary initializePresenters in StSettingSectionPresenter.
Fixes #767 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please review those small issues (specially the first one).
notice that it is possible that you do not want a builder, in that case, please ensure in the other side (the one that will use the result of asSettingPresenter
), there is an owner
set to the resulting presenter.
settingsTarget := aSettingDeclaration realTarget perform: aSettingDeclaration targetSelector. | ||
settingsTarget perform: aSettingDeclaration getSelector ]. | ||
|
||
settingPresenter := (SpPresenter new instantiate: StSettingSHStyleButtonColorPresenterItem on: aSettingDeclaration). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is equivallent to just StSettingSHStyleButtonColorPresenterItem on: aSettingDeclaration
, no need of the bureaucracy... and in any case is not recommended to do it like that. Which is the application that presenter belongs to?
(this still can work if you will after add that presenter to another that knows its app, or set the app, but as is, it doesn't)
The recommended way of doing this is by passing a builder (see SpPresenterBuilder
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll address the suggested changes in a new issue
|
||
colorPickerPresenter := aPresenter instantiate: SpColorPickerWindow on: self. | ||
colorPickerPresenter | ||
whenChangedDo: [ : c | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer real names "aColor" or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, I will address the changes in a new issue.
and now you need to give me a new PR fixing that, as @Ducasse merged :P |
Update each settings browser button color when a color is accepter in the Color Picker window.
Remove unnecessary initializePresenters in StSettingSectionPresenter.