Re: NSMutableArray selector not recognised
Re: NSMutableArray selector not recognised
- Subject: Re: NSMutableArray selector not recognised
- From: Andy Lee <email@hidden>
- Date: Sat, 1 Oct 2005 11:05:11 -0400
On Oct 1, 2005, at 10:56 AM, Aaron Wallis wrote:
Hey All,
im having some trouble with some code i've been working on.
For some reason, a variable [ a NSMutableArray ] isn't responding
to its selectors.
Its all very strange.
heres the code:
NSMutableArray * tempRenders = [ currentRenders
objectAtIndex: myLevel ];
QCRenderer * myRenderer = [[QCRenderer alloc]
initWithOpenGLContext:_openGLContext pixelFormat:format file:qtzFile];
if ( myPriority < 1 )
{
NSLog(@"low priority");
[ tempRenders insertObject:myRenderer atIndex:0 ];
}
else
{
NSLog(@"standard or high priority");
[ tempRenders addObject:myRenderer ];
}
both lines :
[ tempRenders addObject: myRenderer];
and
[ tempRenders insertObject:myRenderer atIndex:0];
are returning "+[NSMutableArray addObject:]: selector not
recognized" and "+[NSMutableArray insertObject:AtIndex:]: selector
not recognized" respectivly...
The "+" in the error messages indicates tempRenders is the
NSMutableArray *class* object rather than an NSMutableArray *instance*.
Check the code where you populate the currentRenders array.
Presumably you intended to create array instances somewhere in your
code. Maybe you used an +alloc method without a corresponding -init?
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden