-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixed settings on Pharo 7 (#1) #12
Conversation
It works on Pharo 6 also. |
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.
Hello, I'm happy to see that this project is used by someone else! :-)
Let's discuss my comments. :-)
@@ -26,8 +26,8 @@ MICarousel class >> activate: aBoolean [ | |||
|
|||
{ #category : #'initialize-release' } | |||
MICarousel class >> initialize [ | |||
super initialize. |
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.
Why removing the call to super here?
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.
While reading your code, I saw a code critic rule discouraging sending #initialize
to super
on the class-side since some class of the top of the hierarchy should not be reinitialized.
I also browsed the Morph hierarchy and I didn't find a single super initialize
collaboration on the class initialization.
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.
Ah yeah, you're right I didn't realised it was on class side.
} | ||
|
||
{ #category : #accessing } | ||
MICarouselSettings class >> defaultThumbnailUpdateTime [ | ||
^ 5 seconds |
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.
Why did you removed the instantiation of a duration from here?
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 stumbled with this bug opening the settings after loading the dev
branch on Pharo 7.
A debugger opens while building a PluggableSliderMorph
. It fails scaling the default value (a 5 seconds duration) within an integer range from 1 to 30 configured on MICarouselSettings class>>#wpThumbnailUpdateTimeSettingsOn:
.
The Duration>#roundTo:
expects another duration. I spent a while trying to fix it keeping the duration and, after failing miserably, I finally changed it for an integer.
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.
Ok, seems legit.
@@ -39,7 +39,7 @@ SystemWindow >> mirageThumbnailPropertySymbol [ | |||
{ #category : #'*Mirage-Carousel' } | |||
SystemWindow >> scheduleThumbnailUpdate [ | |||
([ | |||
MICarouselSettings thumbnailUpdateTime wait. | |||
MICarouselSettings thumbnailUpdateTime seconds wait. |
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.
To put it back here?
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 a consequence of what I describe above.
You did a great job btw, I totally love this project. I missed window navigation so much. |
Thanks for your contribution. I merge this PR. |
Integrate fix for issue #12
Fixes #10