-
Notifications
You must be signed in to change notification settings - Fork 66
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
Introduce SpMenuPresenter>>#fillWith: and add tests and example #1602
Introduce SpMenuPresenter>>#fillWith: and add tests and example #1602
Conversation
…ToolbarPresenterWith: Also add an example and improve the SpCommandGroup class comment.
This change is important for the Spec book. Please merge the PR to Pharo 12 as well. |
thing is, I removed this precisely for a reason: it does not produces a correct "DOM", and I cannot be sure that the resulting toolbar will be attached to a parent or an application (hence, I cannot know if backend will be right) :) toolbar := self newToolbar.
toolbar fillWith: aCommandGroup
... etc... and with this approach, I do not need two methods, since the configuration of the toolbar can happen where it is created. |
uhm... but now I see that there are other idioms (asMenuPresenter, asMenuBarPresenter) in the same problem, I need to fix those too... |
Please do, so that we do not write wrong patterns in the Spec book. cc @Ducasse |
Yes this is really painful to write a book more than people can think. |
…or SpToolbarPresenter>>#fillWith:
…s use SpMenuPresenter as the class to test
…s well, and elaborate tests and example
I read the code and tried some examples. You are right. The
Please read the changes in this PR. I adapted the code:
I will rename this PR to express the changes. I did not:
The removal should be part of another Github ticket to clean up the senders. That is out of the scope of this ticket. If you approve the changes, I will also be happy to make a PR for Pharo 12, as Pharo 12 is the stable version the Spec book is based on. |
I forgot to mention: I fixed a bug in |
Code changes for #1601.
SpCommandGroup>>#asToolbarPresenter
SpCommandGroup>>#asToolbarPresenterWith: