views:

197

answers:

2

Hello,

I'm having trouble compiling the current release. I was able to download a copy of the source distribution today using:

hg clone https://core-plot.googlecode.com/hg/ core-plot

I opened the "core-plot/framework". I then double clicked on CorePlot-CocoaTouch.xcodeproj to launch Xcode. When I build the project I get the following error:

-(void)bind:(NSString *)binding toObject:(id)observable withKeyPath:(NSString *)keyPath options:(NSDictionary *)options
{
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
    [NSException raise:CPException format:BindingsNotSupportedString];
                                          Format not a string literal and no formal arguments
#else
    [super bind:binding toObject:observable withKeyPath:keyPath options:options];
#endif
}

I am running on a new MacBook with OS 10.6, and IPhone Simulator 4.0. Any help will be greatly appreciated.

Charles

A: 

Search in your project for BindingsNotSupportedString, seems like it's not in the current file and therefore needs to be included. Or just try to change this to an acceptable format.

bddckr
+1  A: 

A more appropriate place to ask this question would be the Core Plot mailing list, because I'm one of the few developers for the project that regularly visits here.

That said, the issue here is that we're using a string constant for a format string, which Xcode now seems to be warning about (rightly so, as this can lead to problems). To work around this for now, you can replace the line in CPLayer.m

static NSString * const BindingsNotSupportedString = @"Bindings are not supported on the iPhone in Core Plot";

with

#define BindingsNotSupportedString @"Bindings are not supported on the iPhone in Core Plot"
Brad Larson
as best I can tell, this still hasn't been fixed in the latest of core-plot.
Ben Collins
@Ben Collins - Update your local copy. This was fixed on June 8. I just tried it with the iPhone 4 GM and it no longer throws this warning on compilation.
Brad Larson
@Brad: yep, thanks. What happened was I did a mercurial pull and the merge left out the updates. No idea why, but I did a fresh clone and it was all fine. I'm a mercurial newbie, so I may have missed something obvious.
Ben Collins