make use of -[WOComponent componentBundle]

This commit is contained in:
Wolfgang Sourdeau 2012-10-30 09:41:20 -04:00
parent 7c2079870a
commit 1223a6c0ee

View file

@ -1462,14 +1462,12 @@ RANGE(2);
////////////////////////////////// JUNK //////////////////////////////////////// ////////////////////////////////// JUNK ////////////////////////////////////////
- (NSArray *) cycles - (NSArray *) cycles
{ {
NSBundle *bundle;
NSString *path; NSString *path;
static NSArray *cycles = nil; static NSArray *cycles = nil;
if (!cycles) if (!cycles)
{ {
bundle = [NSBundle bundleForClass:[self class]]; path = [[self componentBundle] pathForResource: @"cycles" ofType: @"plist"];
path = [bundle pathForResource: @"cycles" ofType: @"plist"];
NSAssert(path != nil, @"Cannot find cycles.plist!"); NSAssert(path != nil, @"Cannot find cycles.plist!");
cycles = [[NSArray arrayWithContentsOfFile:path] retain]; cycles = [[NSArray arrayWithContentsOfFile:path] retain];
NSAssert(cycles != nil, @"Cannot instantiate cycles from cycles.plist!"); NSAssert(cycles != nil, @"Cannot instantiate cycles from cycles.plist!");