-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fixing #selectedChest when selecting an item in the tree table view #34
Conversation
…table presenter before raising an exception `#remove` was sent to nil
…unupdated table, with the tree table view as active presenter
…g` with the same `#variableName` instead of the same key
…class initialization
…er, when the class has not fully been initialized
…Chest class via the class environment (Smalltalk globals) to hide thedependency to the Chest class
unrelated failing tests @StevenCostiou |
…ger-extension-Remove-item-context-menu-entry-raises-an-exception-remove-was-sent-to-nil
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.
Changes are good, some comments that should be answered prior to merge.
@@ -796,14 +797,15 @@ ChestTableWithContentPresenter >> removeAllChests [ | |||
{ #category : 'removing' } | |||
ChestTableWithContentPresenter >> removeAllItemsFromSelectedChest [ | |||
|
|||
| items | | |||
| items chest | | |||
self flag: 'to do with polymorphism'. | |||
|
|||
items := activePresenter == chestWithContentTreeTable |
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 do not see clearly how the code works, it seems that seometimes the activePresenter
can be nil (possibly a constraint from Spec?). However in one case (line 922) when testing if activePresenter == chestWithContentTreeTable
there is a nil check over activePresenter
first and in the other case (line 803) there is no nil check.
Shouldn't the nil check be also present line 803?
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 did it on line 922 because #selectedChest
is a method called by commands in their #canBeExecuted
method and activePresenter
is not initialized at that moment.
In line 922, this is ok, this method is called when the user clicks a button, which implies that the presenter is already initialized and that activePresenter
is not nil
Fixes #27 , #31, #28, #30, #25
Each commit fixes one issue, in the order above