Skip to content

objectAtRow always returns nil (FIXED) #1

Description

@lazar108

I call the method like so NSString *testString = [array objectAtRow: 5 column: 1]; and it always returns nil, so i checked the CRL2DArray.m and changed the method to this:

- (id) objectAtRow:(int)x column:(int)y
{
if (x < outerArray.count) {
    NSMutableArray *array = [outerArray objectAtIndex:x];
    if (y < capacity) {
        id data = (id)[array objectAtIndex:y];


        //          No idea why but here if i comment out the code it seems to work perfectly
        //if ([data isKindOfClass:[NSString class]])
            //return nil;
        //else



        return data;
    }
}

[NSException raise:@"Index out of Bounds" format:@"The Indices Provided were Incorrect %i, %i", x,y];
return nil;
}

Which fixed it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions