Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8815843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:28:38+00:00 2026-06-14T04:28:38+00:00

I think i’ve run into a confused state where i’m doing something fundamentally wrong,

  • 0

I think i’ve run into a confused state where i’m doing something fundamentally wrong, but i cannot understand what and why this is happening.

Picture 1: A property of a My class. A NSMutableArray.

Property

Picture2: The code block i want to execute, i want to remove the eleventh object.

Code

Picture3: The debug console shows me that i have 30 objects within my array.

Console statement

And now, here i was, thinking that this would be an easy task. Since, i’ve removed and replaced objects at indexes in other NSMutableArrays within my source-code.
Here comes Picture4:
Stacktrace

I believe this is telling me that NSMutableArray doesn’t respond to removeObjectAtIndex.

Does anyone know what in the heck i’m doing wrong? I’m totally confused.

And no, this is not homework…even if one could believe so. I do.


EDIT:
The error was made during parsing of the objects that went into the dagArray.

Instead of [tempPeriod.dagArray addObject:object] i was doing something completely different.

I was working with a different array and added objects to that array, and when the parser was finished i used tempPeriod.dagArray = [theOtherArray copy] which resulted in this error. theOtherArray was still a NSMutableArray which still confused me. But my best guess is that copy does something with the NSMutableArray rendering it unable to perform those selectors. But i could be completely wrong.

Thanks for shining some thoughts into this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:28:40+00:00Added an answer on June 14, 2026 at 4:28 am

    You need to use -mutableCopy if you want a mutable copy of an array. Using -copy, even on a mutable array, will give you an immutable array.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Think about doing this: import matplotlib.pyplot as plt plt.plot(x_A,y_A,'g--') plt.plot(x_B,y_B,'r-o') plt.show() How would you
I think I have a basic understanding of this, but am hoping that someone
I think this could be a very easy question for you. But I have
I think this has probably been asked, but after reading a lot, I'm not
I think that asking this might be kind of silly but I'm still wondering
Think this should be an easy one. I understand how to establish a connection,
i think this should be very easy , but i really don't know how
I think this is specific to IE 6.0 but... In JavaScript I add a
I think I've seen this answer, but I can't remember where for certain. I'm
I think that the initial state of LL parser's the stack is 0,but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.