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 9255869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:48:25+00:00 2026-06-18T11:48:25+00:00

Ok, I basically need to find a way to better manage 100 NSMutableArrays of

  • 0

Ok, I basically need to find a way to better manage 100 NSMutableArrays of data.

Like, (I haven’t actually done this) :

NSMutableArray *array1;
NSMutableArray *array2;
NSMutableArray *array3;
//etc..

I need something that has multiple facets, like:

NSMutableCombinationArray *theMassiveArray;

[theMassiveArray addObject:theObject forArray:0 atIndex:0];

In the end I want to do something like this:

//in applicationdidfinishlaunching
loopCount = 0;


- (void) frameTimer:(NSTimer*)timer { //called every second

    startingValue = 0;

    for (int i = 1; i <= 100; i++)
    {
        NSString *dmxValues = [NSString stringWithFormat: @"%@,%@,%@,%@,%@", [DMXChannelArray objectAtIndex:startingValue], [DMXChannelArray objectAtIndex:startingValue+1], [DMXChannelArray objectAtIndex:startingValue+2], [DMXChannelArray objectAtIndex:startingValue+3], [DMXChannelArray objectAtIndex:startingValue+4]];

        [theMassiveArray addObject:dmxValues forArray:i-1 atIndex:loopCount];

        startingValue = startingValue + 5;
    }

    loopCount = loopCount + 1;

}

//NOTE DMXChannelArray is updated in another class with current DMX values from a controller.

So there are 512 channels of DMX, and each array needs to hold 5 channels. It’s a recording app that basically stores 500 DMX channel values at a resolution of one time a second.

How can I do this? What’s the best way to do this? I obviously want to avoid writing 100 NSMutableArrays and doing this all manually.

For reference, when recording is over, the user selects how many groups (of 5 channels) he wants to export, then depending on that number, another for loop will go through the NSMutableCombinationArray and export the final arrays.

  • 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-18T11:48:26+00:00Added an answer on June 18, 2026 at 11:48 am

    Write a wrapper class:

    @interface MultiDimensionalMutableArray : NSObject
    
    - (void)insertObject:(id)obj atIndex:(NSUInteger)idx intoArrayAtIndex:(NSUInteger)arrIdx;
    - (id)objectAtIndex:(NSUInteger)idx inArrayAtIndex:(NSUInteger)arrIdx;
    
    @end
    
    @implementation MultiDimensionalMutableArray
    {
        NSMutableArray * arrays;
    }
    
    - (id)init
    {
        // init boilerplate
    
        arrays = [NSMutableArray arrayWithCapacity:100];
        for( int i = 0; i < 100; i++ ){
            [arrays addObject:[NSMutableArray array]];
        }
    
        return self;
    }
    
    - (void)insertObject:(id)obj atIndex:(NSUInteger)idx intoArrayAtIndex:(NSUInteger)arrIdx
    {
        //TODO: Include appropriate bounds checking
        NSMutableArray * innerArray = [arrays objectAtIndex:arrIdx];
        [innerArray insertObject:obj atIndex:idx];
    }
    
    - (id)objectAtIndex:(NSUInteger)idx inArrayAtIndex:(NSUInteger)arrIdx
    {
        return [[arrays objectAtIndex:arrIdx] objectAtIndex:idx];
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basically need to check if there is an easier way to do this
So basically, I need to find a way to retrieve the image url that
I am trying to find the best way to do this, better if I
I haven't been able to find relevant answer to this problem. Please redirect if
Trying to find the best way to write this SQL statement. I have a
This is something I've encountered a few times and haven't been able to find
Basically I'm looking for something exactly like BringIntoViewOnFocusChange for SL4, I need whichever control
Basically need to generate custom(some different then yes no) messeges(alert) in JS , how
basically need to change the value that - admin_url() returns any idea?
I basically need to get user input: gets.chomp(input?) And then to convert the given

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.