Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thomasjt

macrumors newbie
Original poster
Apr 16, 2009
23
0
Hi,

I was having some problems with initialising an NSMutableDictionary so I turned to the documentation. There, I found this example:

Code:
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"value1", @"key1", @"value2", @"key2", nil];

which I then tried to compile. I got the following error - the same one as the error I was getting for my code:

error: initalizor element is not constant

Any ideas what's going on?

Cheers,

Tom
 
Oh wow I suck, it was outside of a method. Thanks so much for your help.

Tom
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.