• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMutableArray selector not recognised
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableArray selector not recognised


  • Subject: Re: NSMutableArray selector not recognised
  • From: Aaron Wallis <email@hidden>
  • Date: Sun, 2 Oct 2005 01:13:36 +1000

Thanks for that andy,

turns out earlier in the script I had [ currentRenders addObject: [NSMutableArray init] ];
when it should have been [ currentRenders addObject:[NSMutableArray array] ];


Thanks for the help !

On 02/10/2005, at 1:05 AM, Andy Lee wrote:


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:
40yahoo.com.au


This email sent to email@hidden


Send instant messages to your online friends http://au.messenger.yahoo.com _______________________________________________
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
References: 
 >NSMutableArray selector not recognised (From: Aaron Wallis <email@hidden>)
 >Re: NSMutableArray selector not recognised (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: NSMutableArray selector not recognised
  • Next by Date: Re: Core Data question on calculating percentages
  • Previous by thread: Re: NSMutableArray selector not recognised
  • Next by thread: Changing the "Report to Apple" crash dialog?
  • Index(es):
    • Date
    • Thread