Skip to content
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

timob-11762: imageView should update images correctly #3689

Merged
merged 2 commits into from Jan 11, 2013

Conversation

hieupham007
Copy link
Contributor

@@ -1039,12 +1035,16 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
} else if (key.equals(TiC.PROPERTY_ENABLE_ZOOM_CONTROLS)) {
view.setEnableZoomControls(TiConvert.toBoolean(newValue));
} else if (key.equals(TiC.PROPERTY_IMAGE)) {
setImageSource(newValue);
if (oldValue.equals(newValue)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use "==" here instead of .equals(), because we are trying to check if two object reference variables refer to the exact same instance of an object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. equals() is more appropriate here, because we only care whether the value of the two objects are the same not the object itself.

@pingwang2011
Copy link
Contributor

Code reviewed and functionally tested. Ran the test case and KS->TableView/ImageView. All passed. Accepted

pingwang2011 added a commit that referenced this pull request Jan 11, 2013
timob-11762: imageView should update images correctly
@pingwang2011 pingwang2011 merged commit 90470da into tidev:master Jan 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants