NSMutableDictionary initialization problems
NSMutableDictionary initialization problems
- Subject: NSMutableDictionary initialization problems
- From: Jacob Lukas <email@hidden>
- Date: Sun, 17 Oct 2004 12:13:55 -0700
I have a subclass of NSDocumentController. In this subclass, I maintain a mutable array. Unfortunately, I cannot find a way to initialize it.
I tried the following methods in -init:
_myArray = [NSMutableDictionary dictionary];
-> _myArray is an NSCFString
_myArray = [NSMutableDictionary dictionaryWithDictionary:[NSDictionary dictionary]];
-> _myArray is a CFDictionary
_myArray = [[NSDictionary dictionary] mutableCopy];
-> _myArray is a CFDictionary
I tried initializing _myArray just before I use it:
if (!_myArray)
_myArray = [NSMutableDictionary dictionary];
[_myArray addObject:someObject];
but that doesn't work... _myArray is a CFDictionary
Can anyone help?
Thanks
Jacob
<x-tad-smaller>PowerMac G4 Digital Audio 466MHz, ATI Radeon 9000 128MB VRAM, 896MB RAM, Mac OS 10.3.5... yes I know, it's time to get a new computer :P</x-tad-smaller><x-tad-smaller>
</x-tad-smaller> _______________________________________________
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