Hey all:
I'm attempting to fill an array, called from awakeFromNib. My problem is that the variable isn't visible when I try to access it.
Here's the relevant snippet:
-(id)returnHaiku
{
return [self getOne:[self getOne:five]] // doesn't know what "five" is...
}
- (void)awakeFromNib
{
[super awakeFromNib];
[self fillArrays];
}
-(id)fillArrays
{
NSArray *five=[NSArray arrayWithObjects: @"blustry zen buddhists",@"barking tiny dogs", @"closeted bigot", @"yowling alley cats",@"shrugging teenagers",@"piece of tangled string", @"ball of woolen yarn", @"big pile of garbage", @"line of well-wishers", @"moldy piece of bread", @"middle manager", @"a terrified rat", @"whispering goofballs", @"various people", @"cross-dressing monkey", @"terrifying dolt", @"sneering idiot", @"grinning sycophant", @"hurtful sloganist",@"annoying haiku",@"hardened criminal",@"vile politician", @"lost generation", @"poetical crap",@"slimy strategist", @"fake conservative", @"old-style liberal",@"evil yuppie scum", @"proud midwesterner",@"artful panhandler",@"noisy spoiled brats",@"frustrated poseurs",nil];
return five;
}
-(id)getOne:(NSArray *)myArray
{
return [[myArray objectAtIndex:arc4random()%myArray.count]stringByAppendingString:@"\n"];
}
I'd appreciate any help you could provide this newbie. Thanks in advance.