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 ////////////////////////////////////////
- (NSArray *) cycles
{
NSBundle *bundle;
NSString *path;
static NSArray *cycles = nil;
if (!cycles)
{
bundle = [NSBundle bundleForClass:[self class]];
path = [bundle pathForResource: @"cycles" ofType: @"plist"];
path = [[self componentBundle] pathForResource: @"cycles" ofType: @"plist"];
NSAssert(path != nil, @"Cannot find cycles.plist!");
cycles = [[NSArray arrayWithContentsOfFile:path] retain];
NSAssert(cycles != nil, @"Cannot instantiate cycles from cycles.plist!");