Authored by Quazie

Reverting change from r280. By trying to get the resources from the RouteMe bun…

…dle (which didn't exist) a slight bug was occuring with invalid paths
... ... @@ -38,7 +38,7 @@ static RMConfiguration* RMConfigurationSharedInstance = nil;
if (RMConfigurationSharedInstance != nil) return RMConfigurationSharedInstance;
RMConfigurationSharedInstance = [[RMConfiguration alloc]
initWithPath: [[NSBundle bundleForClass:@"RMConfiguration"] pathForResource:@"routeme" ofType:@"plist"]];
initWithPath: [[NSBundle mainBundle] pathForResource:@"routeme" ofType:@"plist"]];
return RMConfigurationSharedInstance;
}
... ...
... ... @@ -246,7 +246,7 @@ static CGImageRef _markerBlue = nil;
+ (CGImageRef) loadPNGFromBundle: (NSString *)filename
{
NSString *path = [[NSBundle bundleForClass:@"RMMarker"] pathForResource:filename ofType:@"png"];
NSString *path = [[NSBundle mainBundle] pathForResource:filename ofType:@"png"];
CGDataProviderRef dataProvider = CGDataProviderCreateWithFilename([path UTF8String]);
CGImageRef image = CGImageCreateWithPNGDataProvider(dataProvider, NULL, FALSE, kCGRenderingIntentDefault);
[NSMakeCollectable(image) autorelease];
... ...
... ... @@ -48,7 +48,7 @@ static RMTileImage *_loadingTile = nil;
return _loadingTile;
RMTile t = RMTileDummy();
NSString* file = [[NSBundle bundleForClass:@"RMTileProxy"] pathForResource:@"loading" ofType:@"png"];
NSString* file = [[NSBundle mainBundle] pathForResource:@"loading" ofType:@"png"];
_loadingTile = [[RMTileImage imageWithTile:t FromFile:file] retain];
return _loadingTile;
// return nil;
... ...
... ... @@ -138,7 +138,7 @@
//CGAffineTransform transform = CGContextGetCTM(theContext);
// RMLog(@"transform scale: a:%f b:%f c:%f d:%f tx:%f ty:%f", transform.a, transform.b, transform.c, transform.d, transform.tx, transform.ty);
NSString *path = [[NSBundle bundleForClass:@"RMTiledLayerController"] pathForResource:@"loading" ofType:@"png"];
NSString *path = [[NSBundle mainBundle] pathForResource:@"loading" ofType:@"png"];
CGDataProviderRef dataProvider = CGDataProviderCreateWithFilename([path UTF8String]);
CGImageRef image = CGImageCreateWithPNGDataProvider(dataProvider, NULL, FALSE, kCGRenderingIntentDefault);
CGDataProviderRelease(dataProvider);
... ...
... ... @@ -18,6 +18,19 @@
- (void)performTest
{
NSLog(@"Frameworks");
NSArray *frameworks = [NSBundle allFrameworks];
for ( id oneFramework in frameworks ) {
NSLog ( @"%@", oneFramework );
}
NSLog(@"Bundles");
NSArray *bundles = [NSBundle allBundles];
for ( id oneBundle in bundles ) {
NSLog ( @"%@", oneBundle );
}
NSLog(@" [NSBundle bundleForClass:[mapContents class]] %@", [NSBundle bundleForClass:[upperMapContents class]]);
}
... ...