Re: Help in 2 Diamensional Array
Re: Help in 2 Diamensional Array
- Subject: Re: Help in 2 Diamensional Array
- From: j o a r <email@hidden>
- Date: Fri, 31 Mar 2006 18:25:46 +0200
On 31 mar 2006, at 16.15, Anoop wrote:
Can I use a 2 two dimensional array in NSArray ? ,if yes how is it
possible
Sure:
NSArray *array = [NSArray arrayWithObject: [NSArray array]];
That's a 2D array of size 1x1. Immutable though, so you won't be able
to use it for much...
I want to reuse that array in the method performSelector:
withObject: how is it possible,
I don't get what you're asking for here.
if I am able to manage a 2 dimensional array in this method will
it create any problems with the memory.
Only if you make mistakes.
On 31 mar 2006, at 17.41, Robert Walker wrote:
NSArray is simply a "collection" of objects.
Not only that, it's also an _ordered_ collection!
I don't think it makes sense for them to be multi-dimensional.
Why not? I would agree that it's not a common use for NSArrays, at
least not outside your CS homework...
NSArray require object references as elements.
And?
I think we need more details about what you are trying to
accomplish. I don't believe NSArray is what you want here. Maybe
what you really want is an NSDictionary or possibly an NSArray
containing NSDictionaries as elements.
I agree with you on this though! Anoop: Please provide more
information on what you're _really_ trying to do! Why do you think
you need a 2D array?
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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