Airtower / core-plot

Automatically exported from code.google.com/p/core-plot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[CPTAxisTitle1 isEqual: CPTAxisTitle2] returns YES #425

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
CPTAxisTitle isEqual method returns YES when self and object are (different) 
CPTAxisTitle instances.

CPTAxisTitle inherits from CPTAxisLabel.  CPTAxisLabel overrides isEqual:.  The 
implementation's logic says that if both self and object are of the same class, 
the method returns YES if both self and object have the same tickLocation value.

This logic fails when comparing two CPTAxisTitle instances.  isEqual will 
return YES because the CPTAxisTitle instances both have a 0 tickLocation.

What steps will reproduce the problem?
1.  [CPTAxisTitle1 isEqual: CPTAxisTitle2] 
2.
3.

What is the expected output? What do you see instead?
returns YES, should return NO

What version of the product are you using? On what operating system?
latest, iOS

Please provide any additional information below.

Solution?
CPTAxisLabel provides own isEqual override.  Use contentLayer or 
contentLayer.frame equality to determine object equality if self and object are 
of the same class.  Or perhaps this can be done by revising the CPTAxisLabel 
isEqual override.

Original issue reported on code.google.com by da...@redelablunck.com on 10 Apr 2012 at 2:11

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 10 Apr 2012 at 11:48

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 17 Apr 2012 at 12:36

GoogleCodeExporter commented 8 years ago
This issue was closed by revision dc63da5b59c5.

Original comment by eskr...@mac.com on 17 Apr 2012 at 1:19