kaiserfarrell / core-plot

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

[__NSCFConstantString sizeWithTextStyle:]: unrecognized selector sent to instance #493

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Used the CorePlot Headers and Core Plot Library into the project 
2. I am trying to set the Title to X-Axis using the following function

 CPTXYAxisSet *axisSet = (CPTXYAxisSet *)graph.axisSet;
    CPTXYAxis *x = axisSet.xAxis;
    [x setTitle:xTitle];

3. I am getting this error exactly in this line  [x setTitle:xTitle];

What is the expected output? What do you see instead?

I should see a graph. Instead i am getting the following exception

[__NSCFConstantString sizeWithTextStyle:]: unrecognized selector sent to 
instance 0x6b32c0
2013-01-07 10:37:26.679 GraphPlot[27452:15203] *** Terminating app due to 
uncaught exception 'NSInvalidArgumentException', reason: 
'-[__NSCFConstantString sizeWithTextStyle:]: unrecognized selector sent to 
instance 0x6b32c0'
*** First throw call stack:
(0x2728022 0x1f31cd6 0x2729cbd 0x268eed0 0x268ecb2 0x5142d8 0x514423 0x513e37 
0x520776 0x5106e1 0x510b23 0x2947e1 0x298067 0x297f31 0x16f5a1e 0x1654401 
0x1654670 0x1654836 0x165b72a 0x299b83 0x162c386 0x162d274 0x163c183 0x163cc38 
0x1630634 0x2fdfef5 0x26fc195 0x2660ff2 0x265f8da 0x265ed84 0x265ec9b 0x162cc65 
0x162e626 0x3872 0x1f15)
terminate called throwing an exception

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

I am using the XCode 4.5.2 and Iphone simulator 5.1 and 6.0. 

Please provide any additional information below.

Original issue reported on code.google.com by rvnaresh...@gmail.com on 7 Jan 2013 at 5:09

GoogleCodeExporter commented 8 years ago
Issue 494 has been merged into this issue.

Original comment by eskr...@mac.com on 7 Jan 2013 at 11:48

GoogleCodeExporter commented 8 years ago
That's a category method added by Core Plot. Make sure your project uses both 
the -ObjC and -all_load linker flags. See 
http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications#Dependent_Pr
oject_Install for more information.

Original comment by eskr...@mac.com on 7 Jan 2013 at 11:54

GoogleCodeExporter commented 8 years ago
I am also getting same error but now it's solved.

Need to do simple thing, set the value of Other linker flag.

below I have mention the steps.

Project name - Build Setting - Other linker flag (use search bar to search) - 
"-ObjC"

Original comment by himanshu...@gmail.com on 18 Oct 2013 at 6:02