make use of -[WOComponent componentBundle]
This commit is contained in:
parent
7c2079870a
commit
1223a6c0ee
|
@ -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!");
|
||||||
|
|
Loading…
Reference in a new issue